Glen D souza wrote:
> fld = [ ]
> data = shlex.split(ln)
> for item in data:
>fld.append(item)
> fld = fld + [0] * (5 - len(data))
There's no need to make a copy of data, one item at the time.
It's a tedious way to build a new list, and you are throwing it away in the
next line anyway, a
Glen D souza wrote:
> i have a approach, it may not be best
>
> fld = [ ]
> for data in shlex.split(ln):
>fld.append(data)
>
It's certainly simple! :-)
I (OP) have actually done something quite similar:-
fld = shlex.split(ln)
fld.append(999)
fld.append(999)
It means I can
Chris Angelico wrote:
> On Sat, Sep 29, 2018 at 12:21 PM Chris Green wrote:
> >
> > I have a list created by:-
> >
> > fld = shlex.split(ln)
> >
> > It may contain 3, 4 or 5 entries according to data read into ln.
> > What's the neatest way of setting the fourth and fifth entries to an
> > em
Bart wrote:
> On 30/09/2018 11:14, Chris Green wrote:
> > Chris Angelico wrote:
> >> On Sat, Sep 29, 2018 at 12:21 PM Chris Green wrote:
> >>>
> >>> I have a list created by:-
> >>>
> >>> fld = shlex.split(ln)
> >>>
> >>> It may contain 3, 4 or 5 entries according to data read into ln.
> >>
On Sun, 30 Sep 2018 11:45:21 +0100, Bart wrote:
> On 30/09/2018 11:14, Chris Green wrote:
>> Chris Angelico wrote:
>>> On Sat, Sep 29, 2018 at 12:21 PM Chris Green wrote:
I have a list created by:-
fld = shlex.split(ln)
It may contain 3, 4 or 5 entries accordin
I've been unexpectedly in hospital for the past two weeks, without
internet or email. Just before my unexpected hospital stay, I was
apparently banned (without warning) by Ethan Furman in what seems to me
to be an act of retaliation for my protest against his overzealous and
hostile tone-polici
On Mon, Oct 1, 2018 at 2:34 AM Steven D'Aprano
wrote:
> Subject: Fwd: Temporary Suspension
> To:
> From: Ethan Furman
> Date: Tue, 11 Sep 2018 11:22:40 -0700
> In-Reply-To:
>
> Steven, you've probably already seen this on Python List, but I forgot
> to email it directly to you. My apologies.
>
On 30/09/2018 18:30, Steven D'Aprano wrote:
I've been unexpectedly in hospital for the past two weeks, without
internet or email. Just before my unexpected hospital stay, I was
apparently banned (without warning) by Ethan Furman in what seems to me
to be an act of retaliation for my protest ag
On Sun, Sep 30, 2018 at 6:30 PM, Steven D'Aprano
wrote:
> Notwithstanding Ethan's comment about having posted the suspension notice
> on the list, I see no sign that he actually did so. At the risk of
> further retaliation from the moderators, I am ignoring the ban in this
> instance for the purpo