On Sep 5, 11:49 am, Chris Rebert wrote:
> On Fri, Sep 4, 2009 at 11:39 PM,
> SUBHABRATABANERJEE wrote:
>
>
>
> > And one small question does Python has any increment operator like ++ in C.
>
> No. We do x += 1 instead.
>
> Cheers,
> Chris
> --http://blog.rebertia.com
Thanx for your kind reply
On Fri, Sep 4, 2009 at 11:39 PM, SUBHABRATA
BANERJEE wrote:
> And one small question does Python has any increment operator like ++ in C.
No. We do x += 1 instead.
Cheers,
Chris
--
http://blog.rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
Dear Sir,
Thank you for your kind reply. I would surely check your code. Meanwhile, I
solved it using readlines() but not in your way. I will definitely have a
look in your code. My solution came so smart that I felt I should not have
posted this question.
But I would like to know about,
i) File
No: readlines () retains the "\n"s; splitlines () loses them
Ah, thank you for the clarification!
On Fri, 04 Sep 2009 08:39:37 -0700, Tim Golden
wrote:
Rami Chowdhury wrote:
f = open("myfile.txt", "r")
list_one = f.read().splitlines()
f.close()
Or use f.readlines(), which would do the
Rami Chowdhury wrote:
f = open("myfile.txt", "r")
list_one = f.read().splitlines()
f.close()
Or use f.readlines(), which would do the same thing IIRC?
No: readlines () retains the "\n"s; splitlines () loses them
TJG
--
http://mail.python.org/mailman/listinfo/python-list
f = open("myfile.txt", "r")
list_one = f.read().splitlines()
f.close()
Or use f.readlines(), which would do the same thing IIRC?
On Fri, 04 Sep 2009 07:46:42 -0700, Stephen Fairchild
wrote:
joy99 wrote:
Dear Group,
I have a file. The file has multiple lines. I want to get the line
numb
On Fri, Sep 4, 2009 at 9:50 AM, joy99 wrote:
> Dear Group,
>
> I have a file. The file has multiple lines. I want to get the line
> number of any one of the strings.
> Once I get that I like to increment the line number and see the string
> of the immediate next line or any following line as outp
joy99 wrote:
> Dear Group,
>
> I have a file. The file has multiple lines. I want to get the line
> number of any one of the strings.
> Once I get that I like to increment the line number and see the string
> of the immediate next line or any following line as output. The
> problem as I see is ni
Dear Sir,
Thanx for your prompt reply, I would be trying to work on your suggestion
and get back to you as soon as possible.
Best Regards,
Subhabrata.
On Sun, May 3, 2009 at 10:47 PM, Chris Rebert wrote:
> On Sun, May 3, 2009 at 9:51 AM, SUBHABRATA BANERJEE
> wrote:
> > Dear Group,
> >
> >
> >
On Sun, May 3, 2009 at 9:51 AM, SUBHABRATA BANERJEE
wrote:
> Dear Group,
>
>
>
> I am working on a code like the following:
>
>
>
> from decimal import*
>
> #SAMPLE TEST PROGRAM FOR FILE
>
> def sample_file_test(n):
>
> #FILE FOR STORING PROBABILITY VALUES
>
> open_file=open("/python26/New
Dear Group,
I am working on a code like the following:
from decimal import*
#SAMPLE TEST PROGRAM FOR FILE
def sample_file_test(n):
#FILE FOR STORING PROBABILITY VALUES
open_file=open("/python26/Newfile1.txt","r+")
#OPENING OF ENGLISH CORPUS
open_corp_eng=open("/python26/
On Sat, 02 May 2009 01:26:14 -0700, subhakolkata1234 wrote:
> Dear Group,
>
> I am using Python2.6 and has created a file where I like to write some
> statistical values I am generating. The statistical values are
> generating in a nice way, but as I am going to write it, it is not
> taking it, t
subhakolkata1...@gmail.com a écrit :
Dear Group,
I am using Python2.6 and has created a file where I like to write some
statistical values I am generating. The statistical values are
generating in a nice way, but as I am going to write it, it is not
taking it, the file is opening or closing prop
13 matches
Mail list logo