Answer the question
In order to leave comments, you need to log in
Is it possible to somehow insert a variable into random.seed()?
Is there a code, is it possible to do some manipulation with random.seed()
, so that its value depends on the variable?
import random
x = 15
random.seed([x])
r1 = random.randint(1000,9999)
print(r1)
Answer the question
In order to leave comments, you need to log in
No, you can't: https://pythonz.net/references/named/random.seed/
You will generally devalue the meaning of this operation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question