Igo*_*rio 1 python syntax modulo
def f(x): return x % 2 != 0 and x % 3 != 0
刚学习语言,我认为%是字符串格式化?
%
在官方教程中找到:http: //docs.python.org/release/2.6.1/tutorial/datastructures.html
bry*_*ryn 8
在数字的上下文中,它意味着模数 - 当你将x除以2时得到的余数是x%2.
归档时间:
14 年,6 月 前
查看次数:
3204 次
最近记录: