99 Bottles of Beer/Python: Difference between revisions

No edit summary
Line 110:
print n - 1, 'bottle%s of beer on the wall.\n' % ('s', '')[n - 1 == 1]</lang>
 
===3 Liner (3 statements) using Python 3 f-strings and walrus operator===
<lang python>bottles = 100
while (bottles:=bottles-1) != 0:
Anonymous user