li = []
with open('lo', encoding='utf-8', mode='r') as f1:
for i in f1:
l2=i.strip().split()
dic = {'name':l2[0], 'price':l2[1], 'amount':l2[2]}
li.append(dic)
print(li)
sum = 0
for j in li:
sum=sum+int(j['price'])*int(j['amount'])
print(sum)
[{'name': 'apple', 'price': '10', 'amount': '3'}, {'name': 'tesla', 'price': '100000', 'amount': '1'}, {'name': 'mac', 'price': '3000', 'amount': '2'}, {'name': 'lenovo', 'price': '30000', 'amount': '3'}, {'name': 'chicken', 'price': '10', 'amount': '3'}]
196060