![]() |
|
|
+ Search |
![]()
|
Jul 5th, 2000 10:03
Nathan Wallace, unknown unknown, Hans Nowak, Snippet 308, Chris Tavares
"""
Packages: maths.bases;basic_datatypes.strings
"""
"""
> > Is there a way to read and write base-n strings using pack or unpack. i.e.
> > if I have a string '1001001011' and I tell it to read a 10-digit binary
> > string, it would return 587. If not using pack or unpack, is there another
> > way to do it?
"""
import string
print string.atoi('1001001011', 2)
# 587