橘子味的心
标题:Python3 数字Number Seed 方法

Python3 数字Number Seed 方法

#!/usr/bin/python3
import random

random.seed()
print ("random number with default seed", random.random())
random.seed(10)
print ("random number with int seed", random.random())
random.seed("hello",2)
print ("random number with string seed", random.random())

目录

分类