Question: Tuples and Dictionaries Exercise Tuple Exercises 1. Create two tuple with 5 elements of different types. 2. Access and print the third element of the

Tuples and Dictionaries Exercise Tuple Exercises 1. Create two tuple with 5 elements of different types. 2. Access and print the third element of the first tuple. 3. Can you change the value of an element in the second tuple (what is the result and why?). 4. Find the length of each tuple. 5. Create a new tuple by concatenating two existing tuples. Dictionary Exercises 1. Create a dictionary with three key-value pair that maps countries to their capitals. 2. Access the capital of a country using a key. 3. Change the capital of a country using a key. 4. Add a new country-capital pair to the dictionary. 5. Remove a country-capital pair from the dictionary. 6 . Find the length of the dictionary. 7. Get a list of all the keys in the dictionary. 8. Get a list of all the values in the dictionary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
