Oct-19-2016, 10:17 AM
(Oct-19-2016, 07:28 AM)buran Wrote:(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(())I don't understand why the complications with printing the str '()'. If you want to print empty tuple, do it...
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 (()) () >>>
The original questions was regarding unexpected behaviour using 2to3 tool
Is it tuple? How to address it? It hardly that type(()) should work