-1
act = 0
Muscle_Input = input("Please input muscle you wish to activate: ")
if Muscle_Input == ["a", "A"]:
    act = 1
elif Muscle_Input == ["b", "B",]:
    act = 2
print(act)

I planned to use the variable switch to activate while loops, but every time I attempt to run the script It refuses to change the "act" variable from 0.

1 Answers1

0

input returns a string.

Muscle_Input therefore will NEVER == ["a", "A"] (since that is a list)

instead try

if Muscle_Input in ("a", "A"):
Paul Becotte
  • 9,767
  • 3
  • 34
  • 42