Соколов Артём Константинович 522 ClassOnly 13976 | Островерхов Андрей Сергеевич, 514 группа ClassOnly 13858 | ||||
---|---|---|---|---|---|
f | 1 | from itertools import product | f | 1 | from itertools import product |
2 | 2 | ||||
3 | class Struct: | 3 | class Struct: | ||
4 | __slots__ = [] | 4 | __slots__ = [] | ||
t | 5 | for name in product('abcd', repeat=4): | t | 5 | for attr in product('abcd', repeat=4): |
6 | name = ''.join(name) | 6 | attr = ''.join(attr) | ||
7 | setattr(Struct, name, name) | 7 | setattr(Struct, attr, attr) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|