Advertisement
FranzVuttke

online_calc

May 19th, 2023 (edited)
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | Source Code | 0 0
  1. def calc(a,op,b):
  2.     return {"*" : a * b, "/" : a / b if b !=0 else None, "+" : a + b, "-" : a - b}.get(op, None)
  3.  
Tags: oniline calc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement