From c39746b0bb7a12bf96f3187fa738ccd76ff8fad3 Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Wed, 5 Aug 2020 17:33:57 +0530 Subject: improved demo of `if` expression --- python.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python.html.markdown') 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 = [] -- cgit v1.2.3