Код: Выделить всё
a = [1, 2, 3]
# Version 1
if not 4 in a:
print 'Is the not more Pythonic?'
# Version 2
if 4 not in a:
print 'This haz more Engrish'
Подробнее здесь: https://stackoverflow.com/questions/176 ... ic-for-not
Код: Выделить всё
a = [1, 2, 3]
# Version 1
if not 4 in a:
print 'Is the not more Pythonic?'
# Version 2
if 4 not in a:
print 'This haz more Engrish'