+ 1
What is meant by "subscriptable"? Why the code gives the output as shown?
l = [ 'ar' , [ 1 , 2 ]] print ( l[0][0][0][0][0][0][0][0]) #output = 'a' #but why print(l[1][1][1]) # Doesn't Give 2? #It gives TypeError: int object is not subscriptable.
1 Antwort
+ 5
l[0] = 'ar'
'ar'[0] = 'a'
'a'[0] = 'a'...