next line in jython
count_record=file.readline() count_prev=count_record[:-1] ,
i used this to read the 开发者_如何学Cprevious line and it worked but now when i am using
count_next=count_record[:+1]
i am not able to read the next line , is there is way to do so read the next time .
Thanks for your help
I'm not familiar enough with jython to know what type of data structure count_record
is here, or how it ought to be used.
However, I do know that in any case, it is the call to file.readline()
that is getting the next line.
If you want to use the next line, you will need to call readline again. So, for a quick example, your code would look something like this:
count_record=file.readline()
...
//use count_record here
...
count_record=file.readline()
...
// We now have the second line, use it here
...
精彩评论