VarRandom/aaasenin | VarRandom/Viliana | ||||
---|---|---|---|---|---|
n | n | 1 | from random import randint | ||
1 | from itertools import cycle | 2 | from itertools import cycle | ||
n | 2 | from random import randint | n | ||
3 | 3 | ||||
t | 4 | def randomes(seq): | t | 4 | def randomes(args): |
5 | tupled_seq = [tuple(a) for a in seq] | 5 | args = [tuple(arg) for arg in args] | ||
6 | for diap in cycle(tupled_seq): | 6 | for tup in cycle(args): | ||
7 | yield randint(*diap) | 7 | yield randint(*tup) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|