summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-06-28 01:32:59 -0700
committerAdam Bard <github@adambard.com>2013-06-28 01:32:59 -0700
commit9b217bc769a4184fb14dfc58387a80e933c0859b (patch)
treea25c2c519d4e0e82a609d28d730648862a71143b
parente37b1745a7ef0cfcb4328d8264b3673bc445746f (diff)
parentff14723ee6a4486a9e567f56dfb2eb7c69df582a (diff)
Merge pull request #9 from jssevestre/master
Inequality, compare and chained
-rw-r--r--python.html.markdown15
1 files changed, 14 insertions, 1 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 42801657..300a5519 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -49,11 +49,24 @@ False
not True #=> False
not False #=> True
-
# Equality is ==
1 == 1 #=> True
2 == 1 #=> False
+# Inequality is !=
+1 != 1 #=> False
+2 != 1 #=> True
+
+# More comparisons
+1 < 10 #=> True
+1 > 10 #=> False
+2 <= 2 #=> True
+2 >= 2 #=> True
+
+# Comparisons can be chained !
+1 < 2 < 3 #=> True
+2 < 3 < 2 #=> False
+
# Strings are created with " or '
"This is a string."
'This is also a string.'