2020-10-30

How do I pop the value returned from my array?

So I have a function,

def Multiples(OGvalue, count):
    multiples = []
    for i in range(count):
        multiples.append(i*OGvalue)
    multiples.pop(1), multiples.pop(0)
    return (multiples[randrange(len(multiples))])

that is being called elsewhere in my program. Now, I don't want to random value that is given to repeat, so I want to remove it from my array after it is used, how would I go about doing that?



from Recent Questions - Stack Overflow https://ift.tt/2HJhkZQ
https://ift.tt/eA8V8J

No comments:

Post a Comment