How can I find the remainder when dividing 2 integers

George Sakkis george.sakkis at gmail.com
Thu Mar 2 08:14:30 CET 2006


Learn about ther itertools module, one of the most useful and elegant
modules in the standard library
(http://docs.python.org/lib/module-itertools.html):

import itertools as it
colors = ["#ff0000", "#00FF00", "#0000FF"]
words = "Itertools is a pretty neat module".split()
for word_color in it.izip(word, it.cycle(colors)):
    print "<font color=%s>%s</font>" % word_color

George




More information about the Python-list mailing list