Let me ask my question by a short story! Imagine you have 1000 apples, then you eat 300 of them so you have 700 left. then you eat 300 more so you have 400 then 200 and then final 200. This is a loop But what I want to ask you is that how I can pick and remove these and then keep the remaining items in the list and then pick and remove 300 more and keep the rest?
This is what I did till now:
n = len(cs) ==>
cs is the input name of the component which is in list access and type of 1000 polylines or whatever.
while n > 0:
crvs =
crvs.extend(cs) ==> I imported the in a local list to be able to remove the randomly selected after picking them. Didn’t want to remove the picked ones from the input curve param.
newcrvs = []
rnd = rd.sample(crvs, 350)
newcrvs.append(rnd)
a = newcrvs (or even rnd itself)
So now I have 650 left. How can I use the rest to random samples from it for 2 or 3 more loops? to pick 300 200 200 from each part?