[Tutor] % function

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 26 Apr 2001 19:10:26 -0700 (PDT)


On Thu, 26 Apr 2001, Remco Gerlich wrote:

> On  0, Liana Wiehahn <liana@upfrontsystems.co.za> wrote:
> > Can somebody please explain to me when you are using the % function and
> > explain it to me?
> 
> There are two different % operators, one for numbers and one for strings.
> The number one computes the remainder of a division:
> >>> 4 % 3
> 1    # Because if you do 4/3, the remainder is 1
> 
> You probably meant the string operator :).

By the way, I finally found out where the documentation mentions
string interpolation:

http://python.org/doc/current/lib/typesseq-strings.html#l2h-68

and

http://python.org/doc/current/tut/node9.html#SECTION009100000000000000000


so you can take a look at the documentation if you're a details-oriented
person.