Apr-29-2021, 11:09 AM
Hi
I use the randint method which works fine
I use the randint method which works fine
>>> import random >>> >>> def rand(): for i in range(6): print(random.randint(1, 40)) >>> rand() 6 24 3 14 34 9Now I try to use the sample methods but it returns no results
>>> import random >>> >>> def rand(): for i in range(6): print(random.sample(range(40), 6) >>> rand()what is wrong please?