DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Turn string into operator python
op = {'+': lambda x, y: x + y, '-': lambda x, y: x - y} print(op['+'](1,2))
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Turn
#string
#operator
#python
ADD COMMENT
Topic
COMMENT
Name
8+4 =
Submit