LearnPy Hub
← Tuples & Sets problems
Easy

Tuples Can't Change

Read three words into a tuple. Try to set its first item to new; catch the TypeError and print Tuples cannot be changed, then print the tuple.

Input

Three words.

Output

Two lines.

Sample 1

Input
a b c
Output
Tuples cannot be changed
('a', 'b', 'c')

Sample 2

Input
red green blue
Output
Tuples cannot be changed
('red', 'green', 'blue')
solution.py
Output appears here
Tuples Can't Change · Python practice problem · LearnPy Hub