I am making a text game in Python and I have two menus, the main menu and the attack menu. These functions are in two different files.
When I from attack import *
in my main file to get the attack menu function it works and I can call the attack_menu()
function.
However, when I go to my attack file and I from main import *
and then try to call main_menu()
, it doesn't work. Is there a way to import both the files into each other and not get an error?
main.py
andattack.py
in the same directory - and you runmain.py
as a script, something likepython3 main.py
?