Oct-19-2016, 07:28 AM
(Oct-19-2016, 06:51 AM)Skaperen Wrote: true, but that's not the challenge. the challenge is to get code that does the same thing now in python3 and keep it simple. how simple can it be done in python3? is this the best case?
print('()')?
well, I start to be confused about all this. If you want the python 3 code to print empty tuple, then it is as follows
print(())
Output:Python 3.5.2 (default, Jul 17 2016, 00:00:00)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print (())
()
>>>
I don't understand why the complications with printing the str '()'. If you want to print empty tuple, do it...The original questions was regarding unexpected behaviour using 2to3 tool