The system keeps telling me the 'lloyd' is not in the list


#1



The system report that 'lloyd' is not in the students list.


The system message is 'Oops, try again. It looks like Lloyd is not in the students list. '


My list is 'students = ['lloyd', 'alice', 'tyler']'
Can anyone helps me on it?

Replace this line with your code.


#2

Hi @netmaster12064 ,

The variables, lloyd, alice, and tyler, all need to be in the list. If you have ...

students = ['lloyd', 'alice', 'tyler']

... , then you have three strings in the list, instead. The quotes delimit them as strings.


#3

Can you please give me a right version?


#4

Hi, @netmaster12064 ,

If you remove the quotes, you will have the correct assignment statement.


#5

the names you put (lloyd etc) were strings because they had quotation marks

WRONG
students = ['lloyd','alice,'tyler']

CORRECT
students = [lloyd,alice,tyler]


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.