cast=['sdf','dgas','gs','gag',['hagh',12,['hgh',54]]]
for i in cast:
if isinstance(i,list):
for j in i:
print(j)
else:
print(i)
isinstance(特定标识符,特定类型)
可以把嵌套的列表打印出来
改进:
for i in list_1:
if isinstance(i, list):
print_lol(j)
else:
print(i)
print(print_lol(cast))