Question: This question practices tuples and operations on tuples. a.Write a Python statement that creates a tuple consisting of values December, 15, Tuesday, 2015 and assign
This question practices tuples and operations on tuples.
a.Write a Python statement that creates a tuple consisting of values December, 15, Tuesday, 2015
and assign it to a variable date_t.
b.Write a python expression to get all the components except year of the tuple date_t.
c. Can you modify the day and weekday components of the tuple date_t to 16 and Thursday
respectively ? If yes, show the Python statement to do it. If not why not ?
d. Write a Python expression to convert the tuple date_t to a list and assign it to a variable date_l.
e. Can you modify the day and week day components of the list date_l to 16 and Thursday
respectively ? If yes, show the Python statement to do it. If not why not ?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
