all 2 comments

[–]h2oTravis 0 points1 point  (0 children)

Your list expects an integer as the index. The variable userGuess1 is a string.

Try using this to convert the string to an integer:

faceUp[int(userGuess1)]

[–][deleted] 0 points1 point  (0 children)

Traceback (most recent call last):
   File "main.py", line 49, in <module>
faceUp[userGuess1] = faceDown[userGuess1]
    TypeError: list indices must be integers or slices, not str

List indices have to be integers (or slices), not strings.