📜  python random randint 除了数字 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.998000             🧑  作者: Mango

代码示例1
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