Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- condition = True
- # condition = False
- if condition:
- foo = 'Whatever'
- else:
- foo = 'Nevermind'
- foo = 'Whatever' if condition else 'Nevermind'
- foo = {True:'Whatever', False:'Nevermind'}[condition]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement