You write a module and, while building it, drop a line at the bottom to check it works. Everybody does this.
converter.py sits next to your code with exactly that in it: a to_celsius function, and underneath it one stray print that tries the function out — sitting at the top level, outside the function.
The function is the part you meant to keep. That last line was only ever meant for you.