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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!