Ask coding questions

← Back to all posts
main.py
DennisAnaniev

Hi!
Who knows why python execute all only in main.py
I created folder chapter 1 and one file inside this called strings.py.
But after click Run it doesn't work

Voters
DennisAnaniev
Comments
hotnewtop
Coder100

Hello. Repl.it runs main.py by default.
You can configure that:
create a .replit file:

Alternatively, you can just import it:

RobertCodeGit

@Coder100 same problem for me. If I understood correctly, I have to add an "import" line for every subfile I write, right?
Thanks

Bookie0

i think you have to import those files.
just do from file_name import * and replace the file name with the actual file name. the * means all.

happy coding and hope this helps! =)