| 1 | initial version |
This is probably bad style. I think it would be better to do it like Mike Hansen's second suggestion, or use a dictionary (I don't understand what you are trying to do with your function, but this just returns the hexadecimal form of your number):
sage: value_dict = dict([('x' + str(number), Integer(number).digits(16)) for number in range(129)])
sage: value_dict['x128']
[0, 8]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.