Random number help

Thomas Grops twgrops at googlemail.com
Wed Nov 23 14:17:40 EST 2016


I need a way of generating a random number but there is a catch:

I don't want to include certain numbers, is this possible?

random.randint(1,100) works as it will randomly pick numbers between 1 and 100 but say i don't want 48 to come out is there a way of doing this. It needs to be an integer too so not a list unless there is a way to convert list to int

Many Thanks Tom



More information about the Python-list mailing list