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

Popular posts from this blog

1 PYTHON PROGRAMMING

16 file handling in python

4 Tuple data types