Parser Error: "in" expected after identifier.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GrandeHolt
for key, character in selectable_characters.items():
	if player_select == key:
		player_select_str = character
		break

whats wrong with the code?

:bust_in_silhouette: Reply From: GlitchedCode

it is because you are doing

for key, character in selectable_characters.items():

instead of

for key in selectable_characters.items():

or

for character in selectable_characters.items():

the in keyword is expected but you have a comma

You will need to rewrite this for whatever it is you are trying to do.

It worked! thank you so much

GrandeHolt | 2022-12-28 13:19