List Comprehension Python


#1
class Solution:
# @param A : integer
# @return a list of strings
def fizzBuzz(self, A):
    return ['FizzBuzz' if i%15==0 else 'Fizz' if i%3==0 else 'Buzz' if i%5==0 else str(i) for i in range(1,A+1)]