摘要: 函数也可以返回布尔值(True或False),这种情况便于隐藏函数内部的复杂测试。例如: #!/bin/python def is_divisible(x, y): if x % y == 0: return True else: return False print is_divisible(6, 阅读全文
posted @ 2020-06-15 22:48 巴州夜雨 阅读(2465) 评论(0) 推荐(0) 编辑