New to Python

Lucas Torri lucastorri at gmail.com
Mon Mar 12 10:50:49 EDT 2007


Something like that?

z = tuple(map(lambda x,y: x+y, x, y))

On 3/11/07, Alberto Vieira Ferreira Monteiro <albmont at centroin.com.br>
wrote:
>
> Hi, I am new to Python, how stupid can be the questions I ask?
>
> For example, how can I add (mathematically) two tuples?
> x = (1,2)
> y = (3,4)
> How can I get z = (1 + 3, 2 + 4) ?
>
> Alberto Monteiro
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070312/6145116f/attachment.html>


More information about the Python-list mailing list