How to create a tuple with a single element?

Question

Give an example to demonstrate how a tuple can contain a single element.

in progress 1
YashikaKhurana 4 years 2 Answers 705 views Master 0

Answers ( 2 )

  1. A tuple can have one element if that element is followed by a comma. For instance,
    my_tuple=(1, )

Leave an answer

Browse
Browse