Mix 'n' Match *don't know where I'm wrong*


#1


#2

not can't be used like and or or, it can't be use two combine two conditions, which is why you get syntax error for bool_four

not can be used in a single a condition

you can of course have:

condition1 or not condition2

that is perfectly valid


#3

okay let me try. Thanks


#4

not's only purpose is to make a false condition true and vice versa

this can very useful, for example:

if 1 not in [2,3,4]:

to check if 1 is not present in [2,3,4] list


#5

still getting an error :sob:


#6

please post an updated version of your code


#7


#8

you shouldn't use in, it was just a demonstration of why not can be useful

this clearly confused you


#9

well well :confused:


#10

there are two ways to use not if you have two conditions:

condition1 or not condition2
not condition1 or condition2

use either of this ways as described in the pseudo code above, instead of or you can also use and if you like


#11

Now let me try this :roll_eyes:


#12

Phew! Whoa. That worked. Yaaay! Thank you so much :smile:


#13