| 1 | initial version |
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.
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.