Imprima no arquivo de texto usando o argumento do arquivo embutido

# Appends the print statement into a log.txt

print("Welcome to ItsMyCode", file=open('log.txt','a'))
Gorgeous Gazelle