Files
Ok I code for a school class and i wanted to make several projects in one repl but in different files but is that even posible because it only runs the code in the main.py
Voters
Ask coding questions
Ok I code for a school class and i wanted to make several projects in one repl but in different files but is that even posible because it only runs the code in the main.py
You can use variables from other files by
import
ing them. Example (if the other file is called otherfile.py):Make sure not to include the .py when importing.
Please mark this comment as the answer if it answered your question