-1

I'm not entirely sure how to go about this. Any assistance is appreciated, sorry for the rookie question.

if input_num != 8 or 16 or 32 or 64 or 128 or 256:
    #some function

I think the problem is the 'or', I don't think this is the correct way to do this.

1 Answers1

0

You have to repeat the statement every time so like this:

if input_num != 8 and input_num != 16 and input_num != 32 and input_num != 64 and input_num != 128 and input_num != 256:
Aplet123
  • 33,825
  • 1
  • 29
  • 55