simple question

Johann Hibschman johannh at uclink.berkeley.edu
Sat Mar 23 03:18:03 EST 2002


Christopher Palmer <ctp at ctpdesign.com> writes:

> Let's say I have a variable called a
> and a contains an integer, say 4522
> and I want 4, 5, 2, and 2 to be items in a list instead of an integer...

Try: map(int, str(a))

--Johann



More information about the Python-list mailing list