# Dictionary View Objects # keys() , values() & items() are called Dictionary Views as they provide a dynamic view on the dictionary’s items. # Code dict_a = { 'name': 'Teja', 'age': 15 } view = dict_a.keys() print(view) dict_a['roll_no'] = 10 print(view) #output # dict_keys(['name', 'age']) # dict_keys(['name', 'age', 'roll_
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter