Ask coding questions

← Back to all posts
HarshPancake (0)

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

Answered by mat1 (2927) [earned 5 cycles]
View Answer
mat1 (2927)

You can use variables from other files by importing them. Example (if the other file is called

import otherfile

Make sure not to include the .py when importing.
Please mark this comment as the answer if it answered your question