Run code from another file in python
TheImagin33r (25)

So my program is supposed to be like
if ans == 16:

the underlined part is where i want to put the code to run code from another file in the project called "" its all in python

You are viewing a single comment. View All
ash15khng (561)

Assuming you want to run the code in and it's in the same repl, type import game_code. It should run that file.

TheImagin33r (25)

@ash15khng yes the file is in the same repl. Would there be a way to get a file from another repl? Im actually curious if you can do that

TheImagin33r (25)

@ash15khng when i do "import game_code" it just thinks im trying to import something as if i was doing like "import time"