i am very new to python (we are using pycharm in my half-year programming class) and i am working on my final project which is a choose your own adventure kind of thing. as an example of what im asking, there is a part where you go into a crawlspace and retrieve a guide to fix something else. after you retrieve the guide, if you were to go back to the crawlspace it'd act as if you retrieved the guide again, which is what im unsure on how to solve. here's the main menu for the section (im sure there's a way to simplify all my code but we have to do it like this):
def left_path():
left=input("""What will you do?
[1] Inspect computer
[2] Inspect window
[3] Inspect crawlspace
[4] Check notepad
Type here: """)
if left=="1":
computer()
elif left=="2":
window()
elif left=="3":
crawlspace()
elif left=="4":
print(inventory)
else:
print("That's not an option. Try again.")
left_path()
and going to the crawlspace is this:
def crawlspace():
print("You get on the floor and crawl into the crawlspace.")
#sleep(3)
print("You can't see, but you feel around and find a paper.")
#sleep(3)
print("You leave the crawlspace and look at the paper.")
#sleep(3)
print("It appears to be a guide to the wires...")
#sleep(3)
print("...but there's something written in the corner as well.")
#sleep(3)
print("You decide to write it down.")
inventory.add_item(Item('5##, #△#, C##'))
left_path()
same goes for other parts where you find pieces of passwords, but i only need to show the one to convey what i mean. hopefully that's clear enough, ive never asked anything on here before. basically, i just want it to be like, "you already explored the crawlspace" if you try to select it again. im sure it's a very easy fix, but again i'm incredibly new and know very little. as a side note im familiar with time.sleep, the hashtags are just so i can speed through it to make sure everything works.