example:
import random
random.seed(10)
n1=random.randint(1,5)
n2=random.randint(1,5)
print(n1,n2) # => 5,1
I am not good at English, so I used a translator. Please understand if it's awkward.
If there is the same number in parentheses behind the 'seed' in the same expression, does the value always come out the same? I wonder what the numbers in parentheses do. Run a no number expression multiple times, the value change all the time.
똑같은 식에서 seed 뒤의 괄호 안에 같은 숫자가 들어가면 값도 무조건 똑같이 나오나요? 괄호 안에 들어가는 숫자가 무슨 역할을 하는지 궁금합니다. 숫자를 넣지 않은 식에서는 여러번 실행하면 값이 계속 바뀝니다.