VarRandom/Sharipov_Sait | VarRandom/meacca | ||||
---|---|---|---|---|---|
f | 1 | import random | f | 1 | import random |
2 | 2 | ||||
3 | def randomes(seq): | 3 | def randomes(seq): | ||
n | 4 | segments = [] | n | 4 | seq_list = [] |
5 | for i in seq: | 5 | for i in seq: | ||
n | 6 | segment = [j for j in i] | n | 6 | add_list = list(i) |
7 | segments.append(segment) | 7 | seq_list.append(add_list) | ||
8 | yield random.randint(segment[0], segment[1]) | 8 | yield random.randint(add_list[0], add_list[1]) | ||
9 | while True: | 9 | while True: | ||
t | 10 | for (left, right) in segments: | t | 10 | for (left, right) in seq_list: |
11 | yield random.randint(left, right) | 11 | yield random.randint(left, right) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|