Re: how to deal with space between numbers

2005-08-24 Thread bruno modulix
Mohammed Altaj wrote: > > Thanks a lot for your valuable answer, i like the way you code , Thanks. > but i > would like to use my own, so if it is possible for you and if you have > time, please could you fix my code, so that i can do what i want. > Because i am using the this out put to anoth

Re: how to deal with space between numbers

2005-08-24 Thread Sybren Stuvel
Mohammed Altaj enlightened us with: > Thanks a lot for your valuable answer, i like the way you code , but > i would like to use my own, You don't learn to code properly if you always stick to your own stuff... > so if it is possible for you and if you have time, please could you > fix my code, s

Re: how to deal with space between numbers

2005-08-24 Thread Sybren Stuvel
Mohammed Altaj enlightened us with: > I managed to do all these things , but i did it in the way that i am > reading my data as strings ( no space between numbers) Keep the spaces, and use thestring.split() Sybren -- The problem with the world is stupidity. Not saying there should be a capital p

Re: how to deal with space between numbers

2005-08-23 Thread Bengt Richter
On Tue, 23 Aug 2005 19:20:15 +0200, Mohammed Altaj <[EMAIL PROTECTED]> wrote: > >Dear All > >This is my problem again , I tried to sort it out , but i couldn't , I >am reading data from file using readlines , my input like : > >0 1 2 4 >1 2 4 >2 3 >3 4 > >What i am doing is , starting with the f

Re: how to deal with space between numbers

2005-08-23 Thread Diez B. Roggisch
> Thanks a lot for your valuable answer, i like the way you code , but i > would like to use my own, so if it is possible for you and if you have > time, please could you fix my code, so that i can do what i want. > Because i am using the this out put to another one , and i have the same > proble

Re: how to deal with space between numbers

2005-08-23 Thread Terry Reedy
Your input data file must be formatted in such a way that the program, knowing the format, can separate one number from another. There are two basic ways to do this. 1. Separate the numbers with non-digit characters, such as spaces. (Other characters such as commas are also used, but are more

Re: how to deal with space between numbers

2005-08-23 Thread rafi
bruno modulix wrote: > Mohammed Altaj wrote: > >>Dear All >> >>This is my problem again , > > (snip) > Read my answers to your two previous posts. > (in short : use str.split() - but *do* read my answers if you want to > save you a lot of pain) especially when several persons replied to you...

Re: how to deal with space between numbers

2005-08-23 Thread bruno modulix
Mohammed Altaj wrote: > Dear All > > This is my problem again , (snip) > > I managed to do all these things , but i did it in the way that i am > reading my data as strings ( no space between numbers) something like > > 0124 > 124 > 23 > 34 > > what i would like to know or to do is , how can i

how to deal with space between numbers

2005-08-23 Thread Mohammed Altaj
Dear All This is my problem again , I tried to sort it out , but i couldn't , I am reading data from file using readlines , my input like : 0 1 2 4 1 2 4 2 3 3 4 What i am doing is , starting with the first element in the first line ( which is 0 in this case )and do search in the other lines