Printing using list comprehension

后端 未结 10 1722
一生所求
一生所求 2020-12-03 10:58

From my Python console

>>> numbers = [1,2,3]
>>> [print(x) for x in numbers]
1
2
3
[None, None, None]

Why does this print

10条回答
提交回复
热议问题