Printing all the values in a Dictionary

All the values in a dictionary can be printed as a list using values() function

-----------------------------------------

name = {1:"TalentEve",2:"Embeddeddesignblog",3:"YouTube-Way2Know",4:"Myvision-thisworld",5:"TalentEve"}

print(name.values())

The output of the above code shall be:
dict_values(['TalentEve', 'Embeddeddesignblog', 'YouTube-Way2Know', 'Myvision-thisworld', 'TalentEve'])

Post a Comment

0 Comments