a few questions.

Paul Hankin paul.hankin at gmail.com
Wed Oct 31 20:12:26 EDT 2007


On Oct 31, 10:10 pm, Larry Bates <larry.ba... at websafe.com> wrote:
> for i in xrange(0,5):
>       hundreds, remainder=divmod(stores[i], 100)
>       print "Store: %i %s" % (i+1, hundreds*"*")

Yes, or since you don't need 'remainder'...

for i in range(5):
     hundreds = stores[i] // 100
     print "Store: %i %s" % (i + 1, '*' * hundreds)

--
Paul Hankin




More information about the Python-list mailing list