# HG changeset patch # User Jeff Hammel # Date 1379631890 25200 # Node ID 4e2d8a7eb1887108e6a6f3b3a6f0b810442e93e1 # Parent a075f8a93183e0135c5b1106e04b237fd403541e http://c2.com/cgi/wiki?FizzBuzzTest diff -r a075f8a93183 -r 4e2d8a7eb188 python/fizbuzz.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/fizbuzz.py Thu Sep 19 16:04:50 2013 -0700 @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +for i in range(1,101): + print ''.join([label for val, label in ((3, 'Fizz'), (5, 'Buzz')) + if not i % val]) or i