Psst! Check what courses we have in our offer, and get them all here to save $727. Tick-tock—this deal ends on 3/21.
Tuple basics
3. Defining a tuple with one or zero elements
Tuples in functions


Good job! There are two special cases for defining tuples. If you want to create an empty tuple, you must use empty parentheses parentheses:

empty_tuple = ()

What if you want to create a tuple with a single item? You may use parentheses parentheses or not, but you must include a trailing comma:

single_item_tuple = (1,)

Without the comma, single_item_tuple will be an ordinary integer – even if you surround it with parentheses parentheses.

When you print such a tuple, the trailing comma will also be displayed.


Result: (1,)


Create a tuple named from_city with a single item: 'Paris'. Then print its value to the console.

Stuck? Here's a hint!

Remember about the trailing comma.