Skip to content

Instantly share code, notes, and snippets.

@koushikmln
Created February 6, 2018 08:42
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/139efce4e4964ed3cf28d93674487655 to your computer and use it in GitHub Desktop.
Save koushikmln/139efce4e4964ed3cf28d93674487655 to your computer and use it in GitHub Desktop.
FortheGivenOrderId.py
order_id = 4
total = 0;
for order_item in order_items[:20]:
if int(order_item.split(",")[1]) == order_id:
total = total + float(order_item.split(",")[4])
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment