2. Write a python program to change the symbol between dictionary key and dictionary value, dict_a is provided in the following output. Note that the for loop is expected to be used for this exercise.
The output is:
dict_a={1:"Python", 2:"Is", 3:"Programming", 4:"Language", 5:"the", 6:"most"}
Expected Answer:
1 >>>>> Python
2 >>>>> Is
3 >>>>> Programming
4 >>>>> Language
5 >>>>> the
6 >>>>> most
Sample Answer:
dict_a={1:"Python", 2:"Is", 3:"Programming", 4:"Language", 5:"the", 6:"most"} for dict_key, dict_value in dict_a.items(): print(dict_key,'>>>>>',dict_value)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)