Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python random randint except a number

import random

x = int(raw_input("Number(1-6): ")) # note I made x an int

while True:
    y = random.randint(1, 6)
    if x != y: break
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #random #randint #number
ADD COMMENT
Topic
Name
4+6 =