hi,

Open a file in write mode and with the extension .txt
then write to it.

You'll find lots of examples for writing to the file on the internet.

All the best