[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: This is expected behavior. A set has no defined order. If you convert a set to a list, and you want some specific order, you'll need to sort it yourself. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

2022-03-10 Thread PiTeR
New submission from PiTeR : set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not to find this bug, sometimes you need to display the result several times example code: def tupla(): import random ilosc = random.randint(0,49) n=0