之前使用for循环+if判断,进行分解,如下:
for first_layer in lists:
if isinstance(first_layer,list):
.../usr/bin/env python
#coding:utf-8
fruit=['a','b',123,['c',345,'d',['e','f',90],22,'cc'],'po',34]
def...(first_layer)
else:
print first_layer
layer(fruit)
这样,不管多少个列表嵌套,只需传参给函数就行,可以实现逐级分解