Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def percent(expression="1000*12%") -> float:
- if "%" in expression:
- expression = expression.replace("%","")
- a, b = expression.split("*")
- a, b = float(a), float(b)
- return a*b/100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement