Can we set random() function upper limit to infinity in Python?

727 Views Asked by At

Can we set upper limit of random function to infinity, means that there is no upper limit for random() function and it sets its upper limit automatically from infinite numbers each time we use it.

If not random() function, is there any other function that can do this?

1

There are 1 best solutions below

2
FLAK-ZOSO On
import random
import sys
x = random.randint(0, sys.maxsize)