Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

how does python recognize a tuple? you use brackets around the data val…

Question

how does python recognize a tuple?
you use brackets around the data values.
you use tuple when you create it, as in \mytuple = tuple(3, 5)\.
you use parentheses around the data values.
you declare mytuple to be a tuple, as in \mytuple = new tuple\.

Explanation:

Brief Explanations

In Python, tuples are defined using parentheses around the data values. For example, my_tuple = (1, 2, 3). The tuple() constructor can also be used but the most common and recognizable way is using parentheses. Brackets are for lists, and there is no new tuple syntax in Python like in some other languages.

Answer:

C. You use parentheses around the data values.