The Grout
Between the cracks. My own reference, you won't find this interesting at all.
Wednesday, 30 July 2008
Python conditional expressions
Available from 2.5.
>>> word = "banana" if 0 is 0 else "peel"
>>> word
'banana'
>>> word = "banana" if 1 is 0 else "peel"
>>> word
'peel'
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment