#判断是字符串、元组、列表且长度是否大于5
1 #!/usr/bin/env python 2 def obj_len(arg) : 3 if isinstance(arg,str) or isinstance(arg,list) or isinstance(arg, tuple) : 4 if len(arg) >5 : 5 return True 6 else: 7 return False 8 return None 9 temp = "qwewegfgsd" 10 ret = obj_len(temp) 11 print(ret)