do you fail at FizzBuzz? simple prog test

Grant Edwards grante at visi.com
Mon May 12 13:50:35 EDT 2008


On 2008-05-12, Paul Hankin <paul.hankin at gmail.com> wrote:

> for i in xrange(1, 101):
>     print 'Fizz'*(i%3<1)+'Buzz'*(i%5<1) or i

Doh!  It never occured to me that 'string' * 0 == ''.

-- 
Grant Edwards                   grante             Yow! An air of FRENCH FRIES
                                  at               permeates my nostrils!!
                               visi.com            



More information about the Python-list mailing list