summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorAndre Polykanine A.K.A. Menelion Elensúlë <andre@oire.org>2014-10-09 22:49:47 +0300
committerAndre Polykanine A.K.A. Menelion Elensúlë <andre@oire.org>2014-10-09 22:49:47 +0300
commit39d8753d5285348b998a7b87ae68614acf816df8 (patch)
tree011af0d47747f8cc49b763012e2ea8154b5cc7fb /python3.html.markdown
parentce3fb267f7fc025e4d38556e033dde560da2a193 (diff)
[python/en] Adding exponentiation operator
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index a94f4eae..6fce9bf7 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -3,6 +3,7 @@ language: python3
contributors:
- ["Louie Dinh", "http://pythonpracticeprojects.com"]
- ["Steven Basart", "http://github.com/xksteven"]
+ - ["Andre Polykanine", "https://github.com/Oire"]
filename: learnpython3.py
---
@@ -50,6 +51,9 @@ Note: This article applies to Python 3 specifically. Check out the other tutoria
# Modulo operation
7 % 3 # => 1
+# Exponentiation (x to the y'th power)
+2 ** 4 # => 16
+
# Enforce precedence with parentheses
(1 + 3) * 2 # => 8