Please explain how to define a python tuple with a single element with an example.
That can be done by adding space after the first element, inside of parenthesis, or even without the parenthesis:
t1 = ('element',)
t2 = 'element',
Although the second version might be quite confusing.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.