Skip to content

Instantly share code, notes, and snippets.

@koushikmln
Created February 6, 2018 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koushikmln/88ba864261e4269f296b27ca88b34cbc to your computer and use it in GitHub Desktop.
Save koushikmln/88ba864261e4269f296b27ca88b34cbc to your computer and use it in GitHub Desktop.
order_id = {}
for order_item in order_items[:20]:
if order_item.split(",")[1] in order_id:
order_id[order_item.split(",")[1]] = order_id[order_item.split(",")[1]] + float(order_item.split(",")[4])
else:
order_id[order_item.split(",")[1]] = float(order_item.split(",")[4])
print(order_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment