summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/python.html.markdown b/python.html.markdown
index d29bc3da..d972880f 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -59,6 +59,12 @@ allow you to write Python 3 code that will run on Python 2, so check out the Pyt
-5 // 3 # => -2
-5.0 // 3.0 # => -2.0
+# Note that we can also import division module(Section 6 Modules)
+# to carry out normal division with just one '/'.
+from __future__ import division
+11/4 # => 2.75 ...normal division
+11//4 # => 2 ...floored division
+
# Modulo operation
7 % 3 # => 1