Кизин Кирилл, 118 группа ClassOnly 14476 | Антон Щербаков, 523 ClassOnly 15326 | ||||
---|---|---|---|---|---|
n | 1 | import itertools as it | n | 1 | import itertools |
2 | 2 | ||||
3 | class Struct: | 3 | class Struct: | ||
4 | __slots__ = [] | 4 | __slots__ = [] | ||
t | 5 | for attr in it.product('abcd', repeat=4): | t | 5 | for attribute in itertools.product('abcd', repeat=4): |
6 | strAttr = ''.join(attr) | 6 | str_Attribute = ''.join(attribute) | ||
7 | setattr(Struct, strAttr, strAttr) | 7 | setattr(Struct, str_Attribute, str_Attribute) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|