[docs] Python v3.2.3 - Help me!
focajoca at sapo.pt
focajoca at sapo.pt
Fri Jun 29 17:31:15 CEST 2012
Hello, to whom can help me!
I'm a beginner in programming.
I have a Toshiba Tecra A3 (1.60 GHz Intel Pentium M), and I use python
v3.2.3.
I'm testing the map function,
/map(function, iterable...)/
but I do not get the expected result, as you see below:
Test1:
>>> m=[10,20,30,40]
>>> map(str,m)
<map object at 0x01007AD0>
The expected resultwould be: ['10','20','30','40']
Test2:
>>> defdouble(x):
return 2*x
>>> map (double,m)
<map object at 0x01007A70>
The expected resultwould be: [20,40,60,80]
Where am Igoing wrong?Can you help?
thankin advance
Carlos Cardoso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120629/b555669a/attachment.html>
More information about the docs
mailing list