Not statments


#1

I’m hoping someone can help me understand something about this. I understand the premise behind how not works in the python language, but is it really necessary to have an extra way to say True or False? I mean, is there a situation I am just overlooking in the Boolean section of programming that just True or False isn’t really covered? please help I am very confused!


#2

its very useful. For example, in a project i work on, i needed to apply restrictions to everyone who is not an adminstrator, then:

# pseudo code
if not (administrator == True):
   apply restriction

this is easier then selecting all the other roles and using a bunch of or statements.

I am sure that if you continue, examples will come where not is very useful.