[EMAIL PROTECTED] wrote:
> hi
> i have a file test.dat eg
>
> abcdefgh
> ijklmn
> <-newline
> opqrs
> tuvwxyz
>
>
> I wish to print the contents of the file such that it appears:
> abcdefgh
> ijklmn
> opqrs
> tuvwxyz
>
> here is what i did:
> f = open("test.dat")
> while 1:
>
[EMAIL PROTECTED] enlightened us with:
> thanks..and sorry, i am using the web version of google groups and
> didn't find an option i can edit my post
It's usenet, you can't edit posts.
> so i just removed it..
Which doesn't work at all. Stupid thing they allow you to try and
delete something o
thanks..and sorry, i am using the web version of google groups and
didn't find an option i can edit my post, so i just removed it..
thanks again for the reply..
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> i have a file test.dat eg
>
> abcdefgh
> ijklmn
> <-newline
> opqrs
> tuvwxyz
>
>
> I wish to print the contents of the file such that it appears:
> abcdefgh
> ijklmn
> opqrs
> tuvwxyz
>
> here is what i did:
> f = open("test.dat")
> while 1:
> line
[EMAIL PROTECTED] wrote:
Mick, you should be a bit more patient. Allow for some time for an answer to
arrive. Minor edits of your question don't warrant a repost.
> i have a file test.dat eg
>
> abcdefgh
> ijklmn
> <-newline
> opqrs
> tuvwxyz
>
>
> I wish to print the contents of
hi
i have a file test.dat eg
abcdefgh
ijklmn
<-newline
opqrs
tuvwxyz
I wish to print the contents of the file such that it appears:
abcdefgh
ijklmn
opqrs
tuvwxyz
here is what i did:
f = open("test.dat")
while 1:
line = f.readline().rstrip("\n")
if line == '':