mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-14 02:34:17 +02:00
Fixes #14: Clarified if-as-expression wording in python tut
This commit is contained in:
@@ -101,7 +101,7 @@ try:
|
||||
except NameError:
|
||||
print "Raises a name error"
|
||||
|
||||
# Conditional Expressions can be used when assigning
|
||||
# if can be used as an expression
|
||||
some_var = a if a > b else b
|
||||
# If a is greater than b, then a is assigned to some_var.
|
||||
# Otherwise b is assigned to some_var.
|
||||
|
Reference in New Issue
Block a user