I have the following list:
[0.12458333333051996, 0.7976157407465507, 0.4842939814843703, 0.9736921296280343, 0.4590740740750334, 0.48178240740526235, 0.46826388888439396, 0.0013078703705105, 0.4625000000014552, 0.4758796296300716, 0.4797685185185401, 6.87130787037313, 0.49761574074364034, 2.9876041666648234, 0.4683564814768033, 0.45549768517958, 0.43494212962832535, 2.030381944445253, 0.48494212963123573, 0.817592592597066]
I run this code on the list above:
for dt in dtime_list:
if dt > 0.00694444444444444:
dtime_list.remove(dt)
print(dtime_list)
Output:
==>[0.7976157407465507, 0.9736921296280343, 0.48178240740526235, 0.0013078703705105, 0.4758796296300716, 6.87130787037313, 2.9876041666648234, 0.45549768517958, 2.030381944445253, 0.817592592597066]
I was expecting there wouldn't remain a float greater than 0.00694444444444444. Why is this happening and how can I fix it?
My array is actually float values read from excel for time, with if "dt > 0.00694444444444444" I am trying to find the values greater than 10 mins and remove them from the list.