In this program, we will print the values of the keys of a dictionary.
Steps to solve the program
- Take a Dictionary as input.
- Get the values of the keys of a dictionary using values().
- Use for loop to iterate over keys of the Dictionary.
- Print the output.
dict1 = {'name':'virat','sports':'cricket'}
for value in dict1.values():
print(value
Output :
virat
cricket