Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to call any function with it name as a string

def add(x,y):
	print('does something')
    
eval("add")(x,y)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #call #function #string
ADD COMMENT
Topic
Name
4+7 =