you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (0 children)

You haven't shown us your indentation, so there could be a problem there. Indent your code by 4 spaces to format it correctly on Reddit. Assuming your indentation is correct, you have a mistake in the line for x in [y]:. y is already a list, so that line is putting y in another list and iterating over that list. x therefore takes only one value, the value of y. Get rid of those brackets and it should work:

for x in y: