I'm building an experiment in Psychopy in which, depending on the participants response, I append an element to a list. I'd need to remove/pop/del it after a specific amount of time has passed after it was appended (e.g. 10 seconds). I was considering creating a clock to each element added, but as I need to give a name to each clock and the number of elements created is unpredictable (dependent on the participants responses), I think I'd have to create names to each of the clocks created on the go. However, I don't know how to do that and, on my searches about this, people usually say this isn't a good idea. 
Would anyone see a solution to the issue: remove/pop/del after a specific time has passed after appending the element?
Best,
Felipe
I would take a slightly different approach: I would wrap the items you're inserting into the list with a thin object that has a timestamp field.
Then I'd just leave it there, and when you iterate the list to find an object to pop - check the timestamp first and if it's bigger than 10 seconds, discard it. Do it iteratively until you find the next element that is younger than 10 seconds and use it for your needs.
Implementing this approach should be considerably simpler than triggering events based on time and making sure they run accurately and etc.
Append an element to a list and del/pop/remove it after a a specific amount of time has passed since it was appended