Ask Your Question

Revision history [back]

click to hide/show revision 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]