Converting Strings to Integers in Python

Aahz Maruch aahz at
Tue Feb 22 17:15:16 EST 2000

In article <sSDs4.350$u37.23539 at>,
Lenny Self <lenny at> wrote:
>I am new to Python and programming in general.  I was wondering if someone
>might help me with the proper syntax for converting a string or a portion of
>a string into an integer.

i = int(s)
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

Love does not conquer all.  Humans are extremely flexible, usually more
flexible than we're willing to admit.  But some flexibility comes at a
cost, and sometimes that cost is more than we can bear.

More information about the Python-list mailing list