This question already has an answer here:
I need a code that will give me the name of the function that called the one in which I am now
x = input("Do you want to once again execute this function? (1), Do you want to return back? (2)")
x = int(x)
if x == 1:
#name of the function where I am now
elif x == 2:
#name of the function that called the one in which I am now.
Aucun commentaire:
Enregistrer un commentaire