Reputation:
I know it is possible to put an If/Else statement all on one line, similar to this.
[True if 1 else False]
What version of python was this added?
Upvotes: 1
Views: 126
Reputation: 82018
2.5, it's talked about on Wikipedia.
Reputation: 798606
That was added in Python 2.5.
Reputation: 601559
It was added in Python 2.5.
Upvotes: 9