chars = 'abcdefgh'
for char in chars:
char = 1
>>>a
1
>>>b
1
>>>c
1
chars = 'abcdefgh'
for char in chars:
globals()[char] = 1
print(a, b, c)
from collections import namedtuple
Record = namedtuple('Record', 'a, b, c, d, e, f, g, h')
r = Record(*[1]*8)
print(r.a, r.b, r.h)
class O():
pass
o = O()
for attr in 'abcdefgh':
setattr(o, attr, 1)
print(o.a, o.b, o.h)