In the below example I would expect all the elements to be tuples, why is a tuple converted to a string when it only contains a single string?
>>> a
('a') is not a tuple, but just a string.
('a')
You need to add an extra comma at the end to make python take them as tuple: -
python
tuple
>>> a = [('a',), ('b',), ('c', 'd')] >>> a [('a',), ('b',), ('c', 'd')] >>>