Я хочу иметь возможность распечатать это в текстовом файле, однако я огляделся и не могу понять, что мне нужно делать.
def countdown (n):
while (n > 1):
print('\n',(n), 'Bottles of beer on the wall,', (n), 'bottles of beer, take one down pass it around', (n)-1, 'bottles of beer on the wall.')
n -= 1
if (n == 2):
print('\n',(n), 'Bottles of beer on the wall,', (n), 'bottles of beer, take one down pass it around', (n)-1, 'bottle of beer on the wall.')
else:
print ('\n',(n), 'Bottle of beer on the wall,', (n), 'bottle of beer, take one down pass it around no more bottles of beer on the wall.')
countdown (10)