F
flyaflya
from random import *
col = [0 for i in range(10)]
a = [col for i in range(10)]
seed()
for i in range(10):
for j in range(10):
a[j] = randint(0, 100)
print a
the result is:
[[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60, 1, 51, 81, 70], .....]
why result isn't true random?
but when the code like this:
from random import *
seed()
for i in range(10):
for j in range(10):
print randint(0, 100)
the result is true random, what's deffient between these two segment codes?
col = [0 for i in range(10)]
a = [col for i in range(10)]
seed()
for i in range(10):
for j in range(10):
a[j] = randint(0, 100)
print a
the result is:
[[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60, 1, 51, 81, 70], .....]
why result isn't true random?
but when the code like this:
from random import *
seed()
for i in range(10):
for j in range(10):
print randint(0, 100)
the result is true random, what's deffient between these two segment codes?