I was just thinking because am iterating the tuple i thought its better to verify the kv and then delete it.  Using idx is more effective.  I verified the code and the tuple to see if it modifies the list position.  It does not. So i have change the code to use result.remove(idx).