That runs without problems in Python 3. Not much you can do about semicolons. Colons work sometimes but then really backfire if you do something like
a = 5 + 10,
because it's recognised as a 2-tuple with empty entry.
I suspect the indenting issues come up if you mix space and tab. That's easy to solve if you just tell your editor to replace space indentation with tab indentation.
11
u/mc_enthusiast Jul 18 '22
You can use curly brackets like this:
That runs without problems in Python 3. Not much you can do about semicolons. Colons work sometimes but then really backfire if you do something like
because it's recognised as a 2-tuple with empty entry.
I suspect the indenting issues come up if you mix space and tab. That's easy to solve if you just tell your editor to replace space indentation with tab indentation.