2019独角兽企业重金招聘Python工程师标准>>> def dp(s): if isinstance(s,(int,str)): print(s) else: for item in s: dp(item) l=['jack',('tom',23),'rose',(14,55,67)] dp(l) 原文链接: http://blog.youkuaiyun.com/mypc2010/article/details/8223102 转载于:https://my.oschina.net/changpinghu/blog/92476