Problem
William Tanksley
wtanksle at dolphin.openprojects.net
Wed May 19 15:07:23 EDT 1999
On Wed, 19 May 1999 20:49:23 +0200, Frank de Bot wrote:
>The strings are extracted from a file. (forgot to tell). Do you maybe know a way
>to make the string valid to calculate with?
Sure. If you know they're integers, you can use int(), like this:
str = "1023"
x = int(str)
str = "9123478237486432678342688476234847262348764238L"
y = long(str)
--
-William "Billy" Tanksley
"But you shall not escape my iambics."
-- Gaius Valerius Catullus
More information about the Python-list
mailing list