VarRandom/Ubsefor | VarRandom/princess | ||||
---|---|---|---|---|---|
n | n | 1 | import random | ||
1 | import itertools | 2 | import itertools | ||
n | 2 | import random | n | ||
3 | 3 | ||||
4 | def randomes(seq): | 4 | def randomes(seq): | ||
n | 5 | lst = [] | n | 5 | pairs = [] |
6 | for i in seq: | 6 | for i in seq: | ||
t | 7 | lst.append(tuple(i)) | t | 7 | pairs.append(tuple(i)) |
8 | for x in itertools.cycle(lst): | 8 | for x in itertools.cycle(pairs): | ||
9 | yield random.randint(x[0], x[1]) | 9 | yield random.randint(x[0], x[1]) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|