Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Iterrate over each element in symb
- for share in symb:
- #Get symbol of each element
- symbol = share ["symbol"]
- #Lookup current price of that specific symbol/sahre
- quote = lookup (symbol)
- #save each current price
- for symbol in symb:
- symb[symbol]['currentprice'] = quote ['price']
- symb[symbol]['total'] = quote ['price'] * share["shares"]
- #render values
- return render_template ("index.html", symbol = symb)
Add Comment
Please, Sign In to add comment