Reputation: 3
I trained to write a 2d array and then I dont know how to complete , pls help me here is the code (it's simple) :
family = [
['zak','mikle','lion','sonia','Richard'],
[14 , 12 , 11 , 47 , 48],
['moh','pr','el noob','lala','pa'],
['deep','lovly','noob','kind','smart'],
],
print(family[1][1])
and here is the problem :
Upvotes: 0
Views: 51
Reputation: 554
Get rid of the extra comma after the end of your array:
family = [
['zak','mikle','lion','sonia','Richard'],
[14 , 12 , 11 , 47 , 48],
['moh','pr','el noob','lala','pa'],
['deep','lovly','noob','kind','smart'],
]
print(family[1][1])
Upvotes: 1