How to convert a string into an integer

yinglcs at yinglcs at
Mon Jan 22 22:45:40 CET 2007

Can you please tell me why the following code does not work in python?
My guess is I need to convert 'count' from a string to an integer. How
can I do that?
And my understanding is python is a dynamic type language, should
python convert it for me automatically?

count = sys.argv[2]
for i in range(count):
    #do some stuff

Thank you.

More information about the Python-list mailing list