VarRandom/s02190700 | VarRandom/s02190692 | ||||
---|---|---|---|---|---|
f | 1 | from random import randint | f | 1 | from random import randint |
2 | 2 | ||||
3 | def randomes(seq): | 3 | def randomes(seq): | ||
n | 4 | spisok = [] | n | 4 | pairs = [] |
5 | for i in seq: | 5 | for el in seq: | ||
6 | t = iter(i) | 6 | it = iter(el) | ||
7 | spisok.append((next(t), next(t))) | 7 | pairs.append((next(it), next(it))) | ||
8 | while True: | 8 | while True: | ||
t | 9 | for i in spisok: | t | 9 | for pair in pairs: |
10 | yield randint(i[0], i[1]) | 10 | yield randint(pair[0], pair[1]) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|