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 223 views
223 views asked Mar 4, 2016 by avibootz
1 answer 235 views
2 answers 213 views
2 answers 223 views
...