VarRandom/annavtkn | VarRandom/Viliana | ||||
---|---|---|---|---|---|
f | 1 | from random import randint | f | 1 | from random import randint |
n | 2 | from itertools import cycle, islice | n | 2 | from itertools import cycle |
3 | 3 | ||||
t | 4 | def randomes(seq): | t | 4 | def randomes(args): |
5 | tmp = [tuple(i) for i in seq] | 5 | args = [tuple(arg) for arg in args] | ||
6 | for i in cycle(tmp): | 6 | for tup in cycle(args): | ||
7 | yield randint(*i) | 7 | yield randint(*tup) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|