En Sun, 05 Aug 2007 06:06:54 -0300, SMERSH009 <[EMAIL PROTECTED]>
escribió:
> The only question that remains for me--and this is just for my
> knowledge-- what does the "if i" mean in this code snippet?
> f = [i.split() for i in d if i]
> How is it helpful to leave a dangling "if i"? Why not jus
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
...
> Even with the "if i" included, we end up with an
> empty list at the start. This because the first "blank"
> line wasn't blank, it was a space, so it passes the
> "if i" test.
...and you can fix that by changing the test to [... if i.split()].
[EMAIL PROTECTED] wrote:
> In a message dated 8/4/2007 11:50:05 PM Central Daylight Time,
> [EMAIL PROTECTED] writes:
>
> [EMAIL PROTECTED] wrote:
> > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote:
> >> Hi All.
> >> Let's say I have some badly formatted text called doc:
>
On Aug 5, 4:06?am, SMERSH009 <[EMAIL PROTECTED]> wrote:
> On Aug 4, 8:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Aug 4, 9:21?pm, "Jim Langston" <[EMAIL PROTECTED]> wrote:
>
> > > <[EMAIL PROTECTED]> wrote in message
>
> > >news:[EMAIL PROTECTED]
>
> > > > On Aug 4, 6:35?
On Aug 4, 8:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Aug 4, 9:21?pm, "Jim Langston" <[EMAIL PROTECTED]> wrote:
>
>
>
> > <[EMAIL PROTECTED]> wrote in message
>
> >news:[EMAIL PROTECTED]
>
> > > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote:
> > >> Hi All.
> > >> Let's say
On Aug 4, 9:21?pm, "Jim Langston" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
>
>
>
>
> > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote:
> >> Hi All.
> >> Let's say I have some badly formatted text called doc:
>
> >> doc=
> >> """
> >> fri
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote:
>> Hi All.
>> Let's say I have some badly formatted text called doc:
>>
>> doc=
>> """
>> friendid
>> Female
>>
>> 23 years old
>>
>>
On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote:
> Hi All.
> Let's say I have some badly formatted text called doc:
>
> doc=
> """
> friendid
> Female
>
> 23 years old
>
> Los Gatos
>
> United States
> friend
On Aug 5, 9:35 am, SMERSH009 <[EMAIL PROTECTED]> wrote:
> Hi All.
> Let's say I have some badly formatted text called doc:
>
> doc=
> """
> friendid
> Female
>
> 23 years old
>
> Los Gatos
>
> United States
> friend
Hi All.
Let's say I have some badly formatted text called doc:
doc=
"""
friendid
Female
23 years old
Los Gatos
United States
friendid
Male
24 years old
10 matches
Mail list logo