strings with moreover of one million of characters

R Hughes r__hughes at hotmail.com
Wed Feb 18 18:46:13 EST 2004


Just jumping in here with a possible interpretation of the original question
as referring to a string with one million digits eg :
"123410004352-------------------87690"   1 million digits long
I think the original question was whether this could be evaluated
by int()

"Delaney, Timothy C (Timothy)" <tdelaney at avaya.com> wrote in message
news:mailman.32.1077140976.27104.python-list at python.org...
> From: José Carlos
>
> Is possible use strings with moreover of one million of characters?

Yes. If you have enough memory, which shouldn't be a problem.

> I try using int() but the program keep blocked.

This is a completely separate issue. Presumably you are trying to convert a
string which specifies a *very* large integer into a python long (which in
2.3 is done automatically by int).

If you wait a very long time, and you have enough memory, then this should
work. But it will take a *very* long time.

After you've done that, try multiplying or dividing by another very large
number ...

Tim Delaney






More information about the Python-list mailing list