呵呵,听太白视频做一个列表嵌套列表,然后打印其中的每一个元素,具体代码如下: li = [1,2,3,4,['Mr.lee',5,6,],'donghai','egon'] for i in li: if isinstance(i,list): for new_each in i: print(new_each) else: print(i) 来源:https://www.cnblogs.com/m-r-lee/p/12157405.html 标签 嵌套 each