Python Random Module

 import random

random.random() 

random.uniform(1, 10)

random.randint(1, 10)

random.randrange(0, 101, 2)

random.choice('abcdefghij') 

items = [1, 2, 3, 4, 5, 6, 7]

random.shuffle(items)

items

random.sample([1, 2, 3, 4, 5],  3)

2 comments:

Python said...

Thanks for sharing all the information with us all.
python Online Training

360DigiTMG said...

Really fine and interesting informative article. I used to be looking for this kind of advice and enjoyed looking over this one. Thank you for sharing. typeerror nonetype object is not subscriptable