Share
How to create a tuple with a single element?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Give an example to demonstrate how a tuple can contain a single element.
Answers ( 2 )
A tuple can have one element if that element is followed by a comma. For instance,
my_tuple=(1, )
u = (7,)