On Nov 11, 7:31 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
> > On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote:
>
> > >Eric<[EMAIL PROTECTED]> writes:
> > >> In MATLAB, if I just want the first, fifth and eighth element I
> > >> might do something
Eric wrote:
... In MATLAB, if I just want the first, fifth and eighth element I
might do something like this: b = a([1 5 8]);
On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> replied:
b = [a[i] for i in [1, 5, 8]]
To which Eric said:
Thanks! It makes sense, but in this cas
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote:
>
> > Eric <[EMAIL PROTECTED]> writes:
> >> In MATLAB, if I just want the first, fifth and eighth element I
> >> might do something like this:
> >>
> >> b = a([1 5 8]);
> >
> > Yes: the above c
Steven D'Aprano wrote:
On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote:
Eric <[EMAIL PROTECTED]> writes:
I'm learning Python (while coming from MATLAB). One question I have is
that if I have a list with say 8 elements, and I want just a few of
them how do I select them out. In MATLAB, if
On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote:
> Eric <[EMAIL PROTECTED]> writes:
>
>> I'm learning Python (while coming from MATLAB). One question I have is
>> that if I have a list with say 8 elements, and I want just a few of
>> them how do I select them out. In MATLAB, if I just want t
Eric <[EMAIL PROTECTED]> writes:
> I'm learning Python (while coming from MATLAB). One question I have is
> that if I have a list with say 8 elements, and I want just a few of
> them how do I select them out. In MATLAB, if I just want the first,
> fifth and eighth element I might do something like
Eric wrote:
On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote:
I'm learning Python (while coming from MATLAB). One question I have is
that if I have a list with say 8 elements, and I want just a few of them
how do I select the
On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote:
> > I'm learning Python (while coming from MATLAB). One question I have is
> > that if I have a list with say 8 elements, and I want just a few of them
> > how do I select them
Guilherme Polo wrote:
On Tue, Nov 11, 2008 at 5:47 PM, Eric <[EMAIL PROTECTED]> wrote:
I'm learning Python (while coming from MATLAB). One question I have is
that if I have a list with say 8 elements, and I want just a few of
them how do I select them out. In MATLAB, if I just want the first,
fi
On Tue, Nov 11, 2008 at 5:47 PM, Eric <[EMAIL PROTECTED]> wrote:
> I'm learning Python (while coming from MATLAB). One question I have is
> that if I have a list with say 8 elements, and I want just a few of
> them how do I select them out. In MATLAB, if I just want the first,
> fifth and eighth el
On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote:
> I'm learning Python (while coming from MATLAB). One question I have is
> that if I have a list with say 8 elements, and I want just a few of them
> how do I select them out. In MATLAB, if I just want the first, fifth and
> eighth element I might do
11 matches
Mail list logo