最简洁条件判断写法

本文主要介绍了Python真假值(True or False)小技巧,如下是两种简洁写法:html def isLen(strString): if len(strString)>6: return True else: return False 在Python3中有办法只用一行完成函数:python >>>def isLen(strString):
相关文章
相关标签/搜索