Ask coding questions

← Back to all posts
How to import a file in python?
AnonymousDark (0)

I checked the other answers and they work somewhat but also give a ton of errors. I and My friend are working on a project in which we decided it would be easier to make files instead of having all our code on main.py. However, this has left us with a ton of bugs. Import [File name] works however it presents an error every time we run it. The code also says that the file is imported but unused which has left us confused.

Answered by Coder100 (18175) [earned 5 cycles]
View Answer
Comments
hotnewtop
ch1ck3n (2063)

can you share the link to the repl please

AnonymousDark (0)

@ch1ck3n don't know-how. I'm still new to replit