Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

You could express this as:

a = [input() for i in range(10)]
x = input()
print(x in a)

This is more clear IMO, because if you want to have something happen before 
something else, it's clearest to put them on separate lines, one after the 
other.

I also don't like using "a have x" to duplicate the behavior of "x in a", 
because,
per PEP 20: "There should be one-- and preferably only one --obvious way to do 
it."

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43134>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to