OP's question is: does something like following exists, if not then why
print(p) for p in myList # doesn't work, OP's intuition
answer is, it does exist which is:
[p for p in myList] #works perfectly
Basically, use []
for list comprehension and get rid of print
to avoiding printing None
. To see why print
prints None
see this