Python: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
==Basic Usage== | ==Basic Usage== | ||
How to use Python 3. | |||
===Ternary Operator=== | |||
[http://book.pythontips.com/en/latest/ternary_operators.html Reference] | |||
<syntaxhighlight lang="python"> | |||
is_nice = True | |||
state = "nice" if is_nice else "not nice" | |||
</syntaxhighlight> | |||
===Lambda Function=== | ===Lambda Function=== | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> |