Sep-02-2018, 09:29 PM
1 |
platform.python_version() |
1 |
a = None ; b = 'abc' ; c = b if a = = None else a + ' & ' + b |
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.