1.先用 for 循环取 for item in l: if isinstance(item ,list): for newitem in item: print(newitem) else: print(item 输出: 1 2 3 4 5 6 #利用 for 循环取值,有几层嵌套就要写几层 for 循环,否则不识别。 l=[1,2,[3,4],[5,6,[7,8]]] for item in l: if isinstance(item ,list): for newitem in item: print(newitem)