Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('prices.txt', 'r', encoding='utf-8')
- p = 0.0
- for i in f:
- t = i.split('\t')
- p = p + float(t[1]) * float(t[2].strip('\n'))
- print("%.2f" % p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement