其中一个是否优于另一个?
1)
def even(num):
if num % 2 == 0:
return True
else:
return False
2)
return num % 2 == 0
我更喜欢#2,但我明白为什么人们也可能喜欢#1。
慕娘9325324
一只斗牛犬
相关分类