7 Multi_dimensional_list in python
'''
1. multi-dimensional list contains another list.
'''
l = [1,2,['A',['siva','ram',{'name':'BABU', 'eid':77}],'B','C'],'uma',{'n':'one',88:99},(8,9)]
# To print 99 value from list inside dictionary
print(l[4][88])
# to print ram
print(l[2][1][1])
print(l[2][2])
# To get all keys from dictionary
#print(l[2][1][2].keys())
Comments
Post a Comment