While converting lists to tuples in python 2, I noticed that converting any list with a single item to a tuple produces a comma after the item. >>> tuple([0]) (0,) >>> tuple(['i']) ('i',) What is the reason for the comma being shown? Does it cause any unexpected behaviour other than how it is printed? I […]
The post Why is "tuple([0])" printed as "(0, )"? appeared first on BlogoSfera.