Question: Please need in python 3. [20 points] Dictionary Manipulations Using the following dictionary, which maps country names to Internet top-level domains (TLDs): tlds = {'Canada':

 Please need in python 3. [20 points] Dictionary Manipulations Using the Please need in python

3. [20 points] Dictionary Manipulations Using the following dictionary, which maps country names to Internet top-level domains (TLDs): tlds = {'Canada': 'ca', 'United States': 'us', 'Mexico': 'mx'} perform the following tasks and display the results: a. Check whether the dictionary contains the key 'Canada'. b. Check whether the dictionary contains the key 'France'. C. Iterate through the key-value pairs and display them in two-column format. d. Add the key-value pair 'Sweden' and 'sw' (which is incorrect). e. Update the value for the key 'Sweden' to 'se'. f. Use a dictionary comprehension to reverse the keys and values. g. With the result of part (f), use a dictionary comprehension to convert the country names to all uppercase letters

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!