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 :
Barmar
789k57 gold badges555 silver badges669 bronze badges
1 Answer 1
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])
answered Oct 27, 2020 at 1:04
General Poxter
5542 silver badges8 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-py
,at the end of thefamilyassignment.