Thanks, Ethan. that was a great solution. i just tested it.
On Fri, May 23, 2008 at 7:08 PM, Ethan Furman <[EMAIL PROTECTED]> wrote:
> davidj411 wrote:
>
> When you save an open file to a variable, you can re-use that variable
>> for membership checking.
>> it does not seem to be that way with
On May 24, 6:36 am, davidj411 <[EMAIL PROTECTED]> wrote:
> but when i try to iterate through it again, it appears to print
> nothing (no error either). the file is exhausted?
No, the iterator is finished. Iterators are generally use-once:
"The intention of the protocol is that once an iterator's
On Fri, 23 May 2008 13:36:55 -0700, davidj411 wrote:
> example of open method on file object:
> fhandle=open(filename).readelines()
Here the name `fhandle` is somewhat misleading. You don't bind the file
object to that name, but the result of the call of the `readlines()`
method. Which is a lis
davidj411 wrote:
When you save an open file to a variable, you can re-use that variable
for membership checking.
it does not seem to be that way with the csv.reader function, even
when set to a variable name.
what is the best way to store the open CSV file in memory or do i need
to open the fil
On May 23, 3:36 pm, davidj411 <[EMAIL PROTECTED]> wrote:
> When you save an open file to a variable, you can re-use that variable
> for membership checking.
> it does not seem to be that way with the csv.reader function, even
> when set to a variable name.
>
> what is the best way to store the open
When you save an open file to a variable, you can re-use that variable
for membership checking.
it does not seem to be that way with the csv.reader function, even
when set to a variable name.
what is the best way to store the open CSV file in memory or do i need
to open the file each time?
exampl