Answers for "how to see if a function is executed pythonb"

1

python how to check if a functions been called

def example():
    example.has_been_called = True
    pass

example.has_been_called = False

example()

#Actual Code:
if example.has_been_called:
   print("foo bar")
Posted by: Guest on March-27-2020

Code answers related to "how to see if a function is executed pythonb"

Python Answers by Framework

Browse Popular Code Answers by Language