how to do this pythonic?

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-14T10:40:37Z Indexed on 2010/04/14 10:43 UTC
Read the original article Hit count: 155

Filed under:
|
a = 7
for a in range(10):

    if a == 7:
        pass
    if a == 8:
        pass
    if a == 9:
        pass
    else:
        print "yes"

how to write it shortly?

#like this or... help
if a ?????[7,8,9]:
    pass

© Stack Overflow or respective owner

Related posts about python

Related posts about syntax