How to use not_() logical operation to return not obj in Python

1 Answer

0 votes
from operator import *      

a = 1
print(not_(a))  # not obj  

a = 0
print(not_(a))  # not obj  

a = -1
print(not_(a))  # not obj  


'''
run:

False
True
False

'''

 



answered May 29, 2019 by avibootz
edited May 30, 2019 by avibootz

Related questions

2 answers 337 views
337 views asked Mar 4, 2016 by avibootz
1 answer 325 views
2 answers 343 views
2 answers 350 views
...