2 ms·
Or even this if you don't want explicit numbers, but don't want that many zip/list/dict/range/etc.: attrs = ['bold', 'dark', '', 'underline', 'blink', '',
by viraptor 14y ago
Or even this if you don't want explicit numbers, but don't want that many zip/list/dict/range/etc.:
attrs = ['bold', 'dark', '', 'underline', 'blink', '', 'reverse', 'concealed']
ATTRIBUTES = dict((k,v) for v,k in enumerate(attrs, 1) if k)
# or
ATTRIBUTES = dict(zip(itertools.count(1), attrs))