On Sep 6, 10:31 pm, Steven D'Aprano wrote:
> On Tue, 07 Sep 2010 11:00:45 +1000, Ben Finney wrote:
> > If you're going to use the list of float objects, you can convert them
> > all with a list comprehension.
> [...]
> > >>> numbers_as_float = [float(x) for x in numbers_as_str]
>
> That's awfu
On 7 September 2010 10:56, MRAB wrote:
>
>
> Incidentally, there's a builtin function called 'input' so using it as
> a variable name is a discouraged! :-)
Right-o!
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> Of course, list comps are so seductively easy, and functional
> programming so conceptually different from what many people are used
> to, that such over-specification is an awfully easy trap to fall into.
> I'm sure my own code is filled with similar examples where I us
On Tue, 07 Sep 2010 12:40:57 +1000, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> On Tue, 07 Sep 2010 11:00:45 +1000, Ben Finney wrote:
>>
>> > If you're going to use the list of float objects, you can convert
>> > them all with a list comprehension.
>> [...]
>> > >>> numbers_as_float = [
Steven D'Aprano writes:
> On Tue, 07 Sep 2010 11:00:45 +1000, Ben Finney wrote:
>
> > If you're going to use the list of float objects, you can convert them
> > all with a list comprehension.
> [...]
> > >>> numbers_as_float = [float(x) for x in numbers_as_str]
>
> That's awfully verbose. A m
On Tue, 07 Sep 2010 11:00:45 +1000, Ben Finney wrote:
> If you're going to use the list of float objects, you can convert them
> all with a list comprehension.
[...]
> >>> numbers_as_float = [float(x) for x in numbers_as_str]
That's awfully verbose. A map is simpler:
numbers_as_float = map(f
ceycey writes:
> I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
> '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
> '3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
> '9.0601']. What I want to do is to find minimum and maximum num
On Mon, 2010-09-06 at 17:37 -0700, ceycey wrote:
> I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
> '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
> '3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
> '9.0601']. What I want to do is
On 09/06/10 19:37, ceycey wrote:
I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
'1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
'3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
'9.0601']. What I want to do is to find minimum and m
On 07/09/2010 01:44, Xavier Ho wrote:
On 7 September 2010 10:37, ceycey mailto:cuneyt.er...@gmail.com>> wrote:
I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
'1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
'3.4225', '7.7284', '10.24', '9.0
On 7 September 2010 10:37, ceycey wrote:
> I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
> '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
> '3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
> '9.0601'].
> How can I convert the
I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
'1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689', '1.7689',
'3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
'9.0601']. What I want to do is to find minimum and maximum number in
this list.
I used
12 matches
Mail list logo