alex23 wrote:
> On Feb 20, 5:38 am, Peter Otten <__pete...@web.de> wrote:
>> Yes you can get portions of the line by slicing:
>>
>> for line in open("infile"):
>> if line[8:18] != line[18:28]:
>> print line,
>
> You can also name the slices, which makes the code more clear (IMO):
>
On Feb 20, 5:38 am, Peter Otten <__pete...@web.de> wrote:
> Yes you can get portions of the line by slicing:
>
> for line in open("infile"):
> if line[8:18] != line[18:28]:
> print line,
You can also name the slices, which makes the code more clear (IMO):
endda = slice(8,18)
begda
On Feb 19, 1:44 pm, Curt Hash wrote:
> On Thu, Feb 19, 2009 at 12:07 PM, steven.oldner
> wrote:
>
> > On Feb 19, 12:40 pm, Mike Driscoll wrote:
> > > On Feb 19, 12:32 pm, "steven.oldner" wrote:
>
> > > > Simple question but I haven't found an answer. I program in ABAP, and
> > > > in ABAP you
steven.oldner wrote:
> On Feb 19, 12:40 pm, Mike Driscoll wrote:
>> On Feb 19, 12:32 pm, "steven.oldner" wrote:
>>
>> > Simple question but I haven't found an answer. I program in ABAP, and
>> > in ABAP you define the data structure of the file and move the file
>> > line into the structure, an
On Thu, Feb 19, 2009 at 12:07 PM, steven.oldner wrote:
>
> On Feb 19, 12:40 pm, Mike Driscoll wrote:
> > On Feb 19, 12:32 pm, "steven.oldner" wrote:
> >
> > > Simple question but I haven't found an answer. I program in ABAP, and
> > > in ABAP you define the data structure of the file and move t
On Feb 19, 12:40 pm, Mike Driscoll wrote:
> On Feb 19, 12:32 pm, "steven.oldner" wrote:
>
> > Simple question but I haven't found an answer. I program in ABAP, and
> > in ABAP you define the data structure of the file and move the file
> > line into the structure, and then do something to the fi
On Feb 19, 12:32 pm, "steven.oldner" wrote:
> Simple question but I haven't found an answer. I program in ABAP, and
> in ABAP you define the data structure of the file and move the file
> line into the structure, and then do something to the fields. That's
> my mental reference.
>
> How do I sep
Simple question but I haven't found an answer. I program in ABAP, and
in ABAP you define the data structure of the file and move the file
line into the structure, and then do something to the fields. That's
my mental reference.
How do I separate or address each field in the file line with PYTHON