×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Matthew J_
Added: Jun 22, 2022 11:48 PM
Views: 9
Tags: no tags
  1. import operator
  2.  
  3. action = {
  4.     "+": operator.add,
  5.     "-": operator.sub,
  6.     "/": operator.truediv,
  7.     "*": operator.mul,
  8.     "**": pow
  9. }
  10. print(action['+'](60, 25)) # 85