38016226...@gmail.com writes:
> A=["1","2","3"]
> print(list(map(float,A)).insert(0,1))
>
> I want to insert 1 at the head of the list but this gives me a surprise
Is it the same surprise that you get from print([1,2,3].insert(0,1))?
Or the more advanced surprise from print(A.insert(0,1))?
--
h
On Thu, 22 Sep 2016 12:29:12 -0700, 380162267qq wrote:
> A=["1","2","3"]
> print(list(map(float,A)).insert(0,1))
>
> I want to insert 1 at the head of the list but this gives me a surprise
I am not certain about what you are doing so I might be way off here.
The following will insert 1 at the he
In <39ec91a8-eeae-489f-9237-9d9a481a8...@googlegroups.com>
38016226...@gmail.com writes:
> A=["1","2","3"]
> print(list(map(float,A)).insert(0,1))
> I want to insert 1 at the head of the list but this gives me a surprise
insert() does not return anything; it modifies the existing list in-place.
A=["1","2","3"]
print(list(map(float,A)).insert(0,1))
I want to insert 1 at the head of the list but this gives me a surprise
--
https://mail.python.org/mailman/listinfo/python-list