A tuple with one item: a comma
# A tuple with one item is constructed by following a value with a comma
# (it is not sufficient to enclose a single value in parentheses).
# Ugly, but effective. For example:
singleton = 'hello', # <-- note trailing comma
print len(singleton)
print singleton
Related examples in the same category