You can do it by using a .replit file. Create a .replit file:
And using that, you can past this code:
Make sure you change the file name to whatever you want to run after the "python" in the first line.
You have to import the file. So in main.py, add from [filename] import . Change [filename] with the name of your file. The ` is for importing everything from that file. You could also just do from [filename] import [functionname] and replace [functionname]` with a function, variable, class, etc.
Lemme know if you have more questions.
Good luck! :D