Ask Your Question

Revision history [back]

This gives the list of digits rather than a string:

sage: a = 14
sage: a.digits(2)
[0, 1, 1, 1]

Note that these are listed starting with the units digit.