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