What version of python was this syntax added
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 w开发者_开发技巧as this added?
It was added in Python 2.5.
That was added in Python 2.5.
2.5, it's talked about on Wikipedia.
精彩评论