<type 'tuple'>>>my_tuple = (1,) # Note the trailing comma after the value 1
type(my_tuple)
But if you do this
<type 'int'>>>my_tuple = (1)
type(my_tuple)
you don't get a tuple. I thought that just putting a value inside ( )
would make a tuple. Apparently that is not the case. I hate ugly code
so it would be clean if Python would convert anything put into ( ) to
be a tuple, even if just one value was put in (without having to use
that ugly looking comma with no value after it).