News for hackers. Stuff that matters.
Re:Fizz Buzz codegolf challenge in 15 languages by twiceaday on Sunday December 16, 2012 @10:43PM (#4930723)
My shortest Python solution is 59 characters. Two tricks, use while instead of range, and use string repetition instead of lists

  n=1
  while n<101:print'Fizz'*(n%3<1)+'Buzz'*(n%5<1)or n;n+=1
And here is a wacky one in 96 chars

  w=range(101)
  w[::3]=['Fizz']*34
  w[::5]=['Buzz']*21
  w[::15]=['FizzBuzz']*7
  for s in w[1:]:print s
Re:Fizz Buzz codegolf challenge in 15 languages by ajennings on Tuesday December 18, 2012 @01:04PM (#4938651)
You can save one more character with an exec loop

  n=1;exec"print'Fizz'*(n%3<1)+'Buzz'*(n%5<1)or n;n+=1;"*100