Как я могу повторить этот код, чтобы я мог динамически сохранять значение последней торговли в списке?
def get_ltp(data, strike_price):
for d in data:
if strike_price == d[5]:
return d[5]
n=get_ltp(data, '12000.00')
n2=int(n.replace(',', ''))
vol_opt.append(n2)
print(vol_opt)
threading.Timer(5, get_ltp(data,'12000.00')).start()
get_ltp(data, '12000.00')