标签:
def print_list(the_list,indent=False,level=0):
for each_line in the_list:
if isinstance(each_line,list):
print_list(each_line,indent,level+1)
else:
if indent:
for tab_stop in range(level):
print(‘\t‘,end=‘‘)
print(each_line)
A sample printer of nested lists
标签:
原文地址:http://www.cnblogs.com/yunmenglingxiao/p/4314208.html