Kaden Currier1,325 Points
what did I do wrong
it says invalid syntax at "if items = "A"
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] # Your code here print("continents:") for items in continents: if items = "A" print("* " + items)
Sem Peters3,669 Points
The '=' is only used to SET values of variables, like
variable = 129
You should use the '==' operator to check whether something is equal to something.
So something like:
if items == "A"
would be correct.
The '=' is an assignment operator, the '==' is an operator used to compare. Also, your if-statement does not have indentation. It should, just like you did with the for-loop. The following code should be correct:
for items in continents: if items == "A" print("* " + items)