Created
February 2, 2021 07:27
-
-
Save seisvelas/bcad77140c9568d7256b31a5618309b4 to your computer and use it in GitHub Desktop.
Solution to cassidoo newsletter stock thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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