Hello viewers, I have created this video to explain you about random function in python and different types of options are available with random functions hope you like this video see you in next video soon thanks.
Code:
#random values
import random
#random values
vara=random.random()
print(vara)
print("\n")
#random int value
vara1=random.randint(1,1000)
print(vara1)
print("\n")
#random from list
var12=["dhiadhiad",1232,"dbaidha",2424,"bfuagh","hodiajf",1213,424.252]
tra=random.choice(var12)
print(tra)
#random,randint,choice,shuffle,sample
print("print old:",var12)
random.shuffle(var12)
print("new file:",var12)
#sample
print(random.sample(var12,3))