A good way to unpack a matrix

Andrew Zyman formisc at gmail.com
Wed Sep 13 22:52:17 EDT 2017


hello,
 is there a better approach to populating a function in this situation?

res = self.DB.getPrice():  # returns array of 3x2 always.  symbol_id,
symbol, price.

var1 = self.AFunction(symbols=res[0][2] + '.' + res[1][2], conid1=
self.Contracts[res[0][0]].conId,

conid2=self.Contracts[res[1][0]].conId, price1= res[0][2], price2=
res[1][2])


Thank you.



More information about the Python-list mailing list