Python Programming - Tuples - Discussion

Discussion Forum : Tuples - General Questions (Q.No. 40)
40.
What is the result of the expression tuple(('cat', 'dog', 'rabbit')) * 2?
('cat', 'dog', 'rabbit', 'cat', 'dog', 'rabbit')
['cat', 'dog', 'rabbit', 'cat', 'dog', 'rabbit']
(('cat', 'dog', 'rabbit'), ('cat', 'dog', 'rabbit'))
('catdograbbit', 'catdograbbit')
Answer: Option
Explanation:
The '*' operator is used to repeat the elements of the tuple.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.