1.

Define singleton tuple?

Answer»

While creating a tuple with a single element, add a comma at the end of the element. In the absence of a comma, Python will consider the element as an ordinary data type; not a tuple. Creating a Tuple with one element is called “Singleton” tuple.

MyTup5 = (10,)



Discussion

No Comment Found