On Mon, Aug 15, 2016 at 2:01 AM Jussi Piitulainen <
jussi.piitulai...@helsinki.fi> wrote:
> There is a tradition of returning -1 when no valid index is found.
>
Sometimes it's better to break with tradition. Raise a ValueError. No
silent errors, and all that Zen.
--
https://mail.python.org/mailm
Atri Mahapatra writes:
> I have a list of dictionaries which look like this:
> [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0,
> 'Length': 40.0, 'Object': 'Object2'}.. so on till 10]
>
> I would like to find the first index in the list of dictionaries whose
> length is
On Sun, Aug 14, 2016 at 2:21 PM Atri Mahapatra
wrote:
> I have a list of dictionaries which look like this:
> [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0,
> 'Length': 40.0, 'Object': 'Object2'}.. so on till 10]
>
> I would like to find the first index in the list of d
On 2016-08-14 19:40, Atri Mahapatra wrote:
On Monday, 15 August 2016 00:03:59 UTC+5:30, MRAB wrote:
On 2016-08-14 19:17, Atri Mahapatra wrote:
> I have a list of dictionaries which look like this:
> [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0,
'Length': 40.0, 'Object':
On Monday, 15 August 2016 00:03:59 UTC+5:30, MRAB wrote:
> On 2016-08-14 19:17, Atri Mahapatra wrote:
> > I have a list of dictionaries which look like this:
> > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0,
> > 'Length': 40.0, 'Object': 'Object2'}.. so on till 10]
> >
On 2016-08-14 19:17, Atri Mahapatra wrote:
I have a list of dictionaries which look like this:
[{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, 'Length':
40.0, 'Object': 'Object2'}.. so on till 10]
I would like to find the first index in the list of dictionaries whose l
I have a list of dictionaries which look like this:
[{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, 'Length':
40.0, 'Object': 'Object2'}.. so on till 10]
I would like to find the first index in the list of dictionaries whose length
is greater than a particular value
f
On 17/10/12 12:10:56, Anatoli Hristov wrote:
> I'm trying to index a text in a list as I'm importing a log file and
> each line is a list.
>
> What I'm trying to do is find the right line which contains the text
> User : and take the username right after the text "User :", but the
> list.index("(U
Thanks a lot this solved my issue:)
Regards
Anatoli
On Wed, Oct 17, 2012 at 12:23 PM, Chris Angelico wrote:
> On Wed, Oct 17, 2012 at 9:10 PM, Anatoli Hristov wrote:
>> Hello,
>>
>> I'm trying to index a text in a list as I'm importing a log file and
>> each line is a list.
>>
>> What I'm tryi
On Wed, Oct 17, 2012 at 9:10 PM, Anatoli Hristov wrote:
> Hello,
>
> I'm trying to index a text in a list as I'm importing a log file and
> each line is a list.
>
> What I'm trying to do is find the right line which contains the text
> User : and take the username right after the text "User :", bu
Hello,
I'm trying to index a text in a list as I'm importing a log file and
each line is a list.
What I'm trying to do is find the right line which contains the text
User : and take the username right after the text "User :", but the
list.index("(User :") is indexing only if all the text matching
11 matches
Mail list logo