标签:
>>> movies =[ "the holy grail", 1975,"terry jones",91, ["graham chapman", ["michel palin","john cheelse","terry gilliam","eric idle","terry jones"]]] >>> def print_lol(the_list): for each_item in the_list: if isinstance(each_item,list): print_lol(each_item) else: print(each_item) >>> print_lol(movies) the holy grail 1975 terry jones 91 graham chapman michel palin john cheelse terry gilliam eric idle terry jones
标签:
原文地址:http://www.cnblogs.com/oskb/p/4810611.html