[Tutor] loop couldn't work well and file couldn't close
baidusandy at 126.com
Tue Apr 22 18:13:18 CEST 2014
I'm a newbie to Python. I want to make python useful to my work, to write a script for get some data out. But there are some setbacks. I really needs your help. Please, help me.
-------the first one--------------
for x in range(1,a):
for x in range(a,a+1):
## for the last line, the code couldn't work. I run the script in Windows XP, i don't know if there is something to do with the OS.
--------for another question:-----------
for x in range (a,a+1):
## for this one, file 02 and 01are not the same. to tell the truth, the last line of 01 has not been written into file 02. What's wrong?
I hope you guys can help me.
Thank you all very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor