Skip to content
Sign upLog in

How to run files that are not named

Profile icon

By default, repl runs files that are but If I want to run someother file. How can I run it?

You are viewing a single comment. View All
Answered by Coder100 [earned 5 cycles]
View Answer
Profile icon

On the

make a file with name ".replit", and type:

language="python" run="python"

Importing the file

you can do things like: def main(): print('xD') return 123
from example import main #You can import the file and use he functions main() #write 'xD' in the terminal x = main() print(x) #write 123 in the terminal