Liam cam up with this nice little bit of code to have the adventurer get the key. Try it out and then start messing with the variables.
def KeyGet():
print("Obtained Key")
DoorKey = 1
x = input(" ")
if x == "Take Key" :
KeyGet()
KeyGet()
def KeyGet():
print("Obtained Key")
DoorKey = 1
x = input(" ")
if x == "Take Key" :
KeyGet()
KeyGet()