Statement (un)equality

Adam Przybyla adam at gliwice.pl
Fri Feb 20 11:31:29 CET 2004


castle:/home/adam>python
Python 2.3 (#3, Aug  4 2003, 16:43:33)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> [[y,x] for x,y in [1,2],[3,4]]
[[2, 1], [4, 3]]
>>> map(lambda x,y: [y,x], [1,2],[3,4])
[[3, 1], [4, 2]]
>>>
Why there is a difference? How to make the same thing like in map statement?
Regards
								Adam Przybyla



More information about the Python-list mailing list