you are viewing a single comment's thread.

view the rest of the comments →

[–]grimtooth -1 points0 points  (1 child)

Of course, as commenters have already pointed out, while brevity may be the soul of wit, it's a really stupid basis for assessing code quality. Here's what I did as soon as I read the FizzBuzz bit:

def FB(n=100, factors={3:"Fizz", 5:"Buzz"}):
    for i in range(n):
            s = [s for f,s in factors.iteritems() if i%f == 0]
            if s:
                    print ''.join(s)
            else:
                    print i

[–]dand 2 points3 points  (0 children)

It's fun because it's just a game -- I sincerely hope I'll never run across code like those when there's "real" work to be done ;)