← Go Back
How to Get a Function Name as a String
>>> def greet(name):
... print("Hello", name)
...
>>> greet.__name__
'greet'
🐍 You might also find interesting: