This question is two-folded. Firstly, for my understanding, the idea to uniformly remove 10% from a given list is like the following. (1): count the 10% * totul number of elements (2): randomly and uniformly remove element one by one until the number of elements in the list is at most 90% * totul number of elements I.e.,
while (the current number of elements is bigger than 90% * totul number of elements)
randomly and uniformly generate an element from the current list and remove it.
Is the above correct? Does this more sound like without replacement? Or is there any built-in python function I can use. Secondly, following this link, Very fast sampling from a set with fixed number of elements in python I got the idea that removing elements from a list in python is costly. So, is there any better way to get around this? Many thanks.