Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很简单的问题。对不起,我是新人。我在下面有这段代码:
list = ['edward', 'jason', 'john'] for i in list: print list
它产生:
john
为什么我只知道姓氏?我想要所有这些。IE。
edward jason john
i你不应该打印list:
i
list
lis = ['edward', 'jason', 'john'] #don't use list as a variable name for i in lis: print i