Python Programming - Tuples - Discussion

Discussion Forum : Tuples - General Questions (Q.No. 14)
14.
How can you create a tuple with a single element?
single_tuple = (1)
single_tuple = (1,)
single_tuple = 1
single_tuple = tuple(1)
Answer: Option
Explanation:
Using a comma after the single element ensures it is treated as a tuple.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.