From 451ccaec5b489f0144cf3d537c0debb73ebd3c82 Mon Sep 17 00:00:00 2001 From: Ankit Aggarwal Date: Fri, 16 Oct 2015 20:42:03 +0530 Subject: Adding documentation on ternary operator --- python.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/python.html.markdown b/python.html.markdown index b939ebbe..daaeb70c 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -165,6 +165,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 -- cgit v1.2.3