Modul (%) in python not like in C?

Paul Rubin http
Tue Sep 11 08:13:57 CEST 2007


Bryan Olson <fakeaddress at nowhere.org> writes:
> > FIrst of all, how is the % symbol (as in 70%6=4) called in English?
> 
> The operator is usually called "mod". (The symbol is usually
> called "percent".)

In Lisp, we'd say Python implements the mod function and C implements
the rem (remainder) function.  See also the functions floor and
truncate:

http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node130.html



More information about the Python-list mailing list