Skip to content

Instantly share code, notes, and snippets.

@seisvelas
Created February 2, 2021 07:27
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 seisvelas/bcad77140c9568d7256b31a5618309b4 to your computer and use it in GitHub Desktop.
Save seisvelas/bcad77140c9568d7256b31a5618309b4 to your computer and use it in GitHub Desktop.
Solution to cassidoo newsletter stock thing
def stockQueue(snapshot):
dequeued_snapshot = {
stock['sym']:stock['cost'] for stock in snapshot
}
return [
{
'sym':stock,
'cost': cost
} for stock, cost in dequeued_snapshot.items()
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment