99 Bottles of Beer/Python: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 110: | Line 110: | ||
print n - 1, 'bottle%s of beer on the wall.\n' % ('s', '')[n - 1 == 1]</lang> |
print n - 1, 'bottle%s of beer on the wall.\n' % ('s', '')[n - 1 == 1]</lang> |
||
=== |
===Python 3 f-strings and walrus operator=== |
||
<lang python>bottles = 100 |
<lang python>bottles = 100 |
||
while (bottles:=bottles-1) != 0: |
while (bottles:=bottles-1) != 0: |