Skip to main content
7 events
when toggle format what by license comment
Mar 13, 2017 at 2:32 comment added Ahmed Raza Thanks for your help and effort sir, respected.
Mar 13, 2017 at 2:31 vote accept Ahmed Raza
Mar 12, 2017 at 18:15 comment added Steve Bunting Why not replace curprice.append (quote["price"]) with share["quoteprice"] = quote["price"], then you will be able to access the value in your html template with stock["quoteprice"].
Mar 12, 2017 at 17:53 comment added Ahmed Raza Sir I have tried every thing but can't determine how to execute this loop kindly help here on what to iterate for loop I have tried almost every thing... 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 i in : symb['currentprice'] = quote ['price'] symb['total'] = quote ['price'] * share["shares"]
Mar 12, 2017 at 14:25 comment added Steve Bunting Isn't symb a list of dictionaries? So it would have to be symb[i]['current price'] = quote['price'] or similar right?
Mar 12, 2017 at 14:09 comment added Ahmed Raza I have used many mathods ti add current price into symbol but failed the last one is this symb['currentprice'] = quote ['price'] It should add another field in the dict symb called current price but error is "list indices must be integers, not str" kindly help me how can I do it.
Mar 12, 2017 at 8:12 history answered Steve Bunting CC BY-SA 3.0