Sep-02-2018, 09:29 PM
platform.python_version()'3.5.1'
a=None; b='abc'; c = b if a == None else a + ' & ' + bTraceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
I thought that the rest part after 'else' would not be interpreted since a==None.
Any thought please? Thank you.