Dec-06-2018, 07:23 PM
Hello guys,
Is there any command for repeating for cycle? I need to have done list of numbers that do not repeat...
Thank you!
Is there any command for repeating for cycle? I need to have done list of numbers that do not repeat...
z=[] for i in range(15): number=random.randint(0,99) if number not in z: z.append(number)...but in my code when two numbers are same I get only 14 numbers in list and throws error "list index out of range"
Thank you!