Ask coding questions

← Back to all posts
I have created 2 python files but whenever I run 2nd file it's giving the output of first file only
sahilverma6


Here's my files

Voters
sahilverma6
Comments
hotnewtop
Coder100

Use import list_pract to import a file which python runs. Repair only runs main.py

MrVoo

If you put import list_pract it will run the file.

sn236

I think you need to link your 2nd file to main.py because main.py will only run.

sahilverma6

@sn236 So, is it not possible that others file can run by itself?

sn236

@sahilverma6 no, at least on repl it's not possible

sahilverma6

@sn236 Ok, thank you

sn236

@sahilverma6 and you need to add import list_pract in main.py remove it from list_pract.py. Then both of them will run.