get random number in python function code example
Example 1: how to generate a random number python
import random
n = random.randint(0,22)
print(n)
Example 2: random in python
print(random.randint(1, 100))
print(random.random())
import random
n = random.randint(0,22)
print(n)
print(random.randint(1, 100))
print(random.random())