3 ms·
print('\n'.join([ 'fizzbuzz' if x%15 == 0 else 'fizz' if x%3 == 0 else 'buzz' if x%5 == 0 else str(x) for x in range(1, 101)])
by a3n 8y ago
print('\n'.join([
'fizzbuzz' if x%15 == 0 else
'fizz' if x%3 == 0 else
'buzz' if x%5 == 0 else
str(x)
for x in range(1, 101)]))
Or
for x in ['fizzbuzz' if x%15 == 0 else
'fizz' if x%3 == 0 else
'buzz' if x%5 == 0 else
x for x in range(1, 101)]:
print x