#-*-coding:utf-8-*- ‘‘‘ 打印列表,遇到列表中的列表也循环打印 ‘‘‘ li = [1,2,3,[1,2,3,5,6],‘hjaha‘] lie = [] #print(type(li[0])) #print(type(li)) for i in li: if type(i) != type(li): print(i) else: for j in i: print(j)
原文地址:https://www.cnblogs.com/sunnybowen/p/10205106.html
时间: 2024-10-14 10:56:57