DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+7 =
Submit