summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkevinnls <57634663+kevinnls@users.noreply.github.com>2020-08-05 17:33:57 +0530
committerkevinnls <57634663+kevinnls@users.noreply.github.com>2020-08-05 17:33:57 +0530
commitc39746b0bb7a12bf96f3187fa738ccd76ff8fad3 (patch)
tree0843448af10589dfb860a9d7d7fb9c8a6ef9d6ed
parent59c7f495c82c27daa97e5d5f05b4420cd0d68046 (diff)
improved demo of `if` expression
-rw-r--r--python.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 44ed7ed9..27b2b22a 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -186,7 +186,7 @@ some_unknown_var # Raises a NameError
# if can be used as an expression
# Equivalent of C's '?:' ternary operator
-"yahoo!" if 3 > 2 else 2 # => "yahoo!"
+"yay!" if 0 > 1 else "nay!" # => "nay!"
# Lists store sequences
li = []