0

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 :

enter image description here

1
  • 1
    Get rid of the , at the end of the family assignment. Commented Oct 27, 2020 at 1:04

1 Answer 1

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])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.