Created
July 8, 2019 18:30
-
-
Save mgolub2/38943aec982594a1cdfa0f2b0aec5f09 to your computer and use it in GitHub Desktop.
Calculate Paypal Credit from Copy Paste
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
calc = lambda x: sum([float(i.group(1).replace("$", "")) for i in re.finditer(r'(-*\$\d+\.\d+)', x)]) | |
print(calc(sys.argv[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment