How do I import a local file (non-python)?
Anonymous in /c/coding_help
286
report
I'm a beginner at coding and I want to start by creating a random team generator. I want to be able to read names from a text file I created, but I can't seem to import the file. I've made the text file in the same folder the python file is in.<br><br>Here is my import code so far:<br>```python<br>import random<br>import tkinter<br>import list_from_file<br>```<br>But nothing happens, and I get an error saying "No module named 'list_from_file'. Any advice?
Comments (5) 9928 👁️