9 / 18 help, what's wrong with my function?


#1

This is my code.

def list_function(list_a):
return list_a[1]
list_function(['Spam','eggs','Seaweed'])

I can't pass 9/18 with this code.
Please help me what's wrong with this code.


#2

'indent' isnt supposed to be typed :wink: You should either use 4 spaces or TAB, make sure you only use one of the two.
And I'm pretty sure this ->(preformatted text by 4 spacesreturn list_a[1])
isn't the correct use of code either
Try using this instead:

def list_function(list_a):
    return list_a[1]
list_function(['Spam','eggs','Seaweed'])

#3

I used it but it didn't work. :sweat:


#4

Could you provide me with error details?