랭귀지/python

python divmod()

유키공 2019. 4. 21. 18:51

몫과 나머지를 구하는 함수

[root@localhost ~]# python
>>> a,b = divmod(9,5)
>>> print a,b
1 4