Last active
December 10, 2015 05:38
-
-
Save c0ldlimit/4389093 to your computer and use it in GitHub Desktop.
Python: Simple One-Line IF Statement #python #c0ldlimit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # value_when_true if condition else value_when_false | |
| 'Yes' if fruit == 'Apple' else 'No' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment