summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2015-10-18 12:15:55 -0500
committerLevi Bostian <levi.bostian@gmail.com>2015-10-18 12:15:55 -0500
commit3d70c872e4433ab34e568ff9f32adccd37c9c275 (patch)
treea26571daabeae0bf3e03868c41a5549608029edd /python.html.markdown
parenta3db78c73d6db0e7a51698b0470b2177a550f1dd (diff)
parent451ccaec5b489f0144cf3d537c0debb73ebd3c82 (diff)
Merge pull request #1560 from ankitaggarwal011/python27-ternary-operator-doc-add
[python/en] Adding documentation on ternary operator
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown1
1 files changed, 1 insertions, 0 deletions
diff --git a/python.html.markdown b/python.html.markdown
index d972880f..675967f4 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -172,6 +172,7 @@ some_var # => 5
some_other_var # Raises a name error
# if can be used as an expression
+# Equivalent of C's '?:' ternary operator
"yahoo!" if 3 > 2 else 2 # => "yahoo!"
# Lists store sequences