Message386534
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." |
|
Date |
User |
Action |
Args |
2021-02-05 17:55:26 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, mablue |
2021-02-05 17:55:26 | Dennis Sweeney | set | messageid: <1612547726.71.0.881206702369.issue43134@roundup.psfhosted.org> |
2021-02-05 17:55:26 | Dennis Sweeney | link | issue43134 messages |
2021-02-05 17:55:26 | Dennis Sweeney | create | |
|