Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python How to convert a string to the name of a function?

def test():
	print("Working")


eval("test")  # function name
# or
eval("test")()  # function call
 
PREVIOUS NEXT
Tagged: #Python #How #convert #string
ADD COMMENT
Topic
Name
5+1 =