Anonymous     Python     24 Jun 2011    
1
2
3
4
5
6
class Enumerate(object):
def __init__(self, names):
for number, name in enumerate(names.split()):
setattr(self, name, number)
num = Enumerate('ZERO ONE TWO THREE FOUR')
print num.ZERO + num.ONE + num.TWO + num.THREE + num.FOUR