Python super clean solution


#1
class Solution:
# @param A : integer
# @return a list of strings
def fizzBuzz(self, A):
    threes = ['Fizz', '', ''] # len(threes) = 3 as 0 <= x % 3 <= 2 for any x
    fives = ['Buzz', '', '', '', ''] # len(fives) = 5 as 0 <= x % 5 <= 4 for any x
    return [i if i % 3 and i % 5 else threes[i % 3] + fives[i % 5] for i in range(1, A + 1)]