adding vectors

Paul Rubin http
Mon Dec 19 23:07:48 EST 2005


Andy Leszczynski <yahoo at nospam.leszczynscy> writes:
> Short question: why (1,"abc",0.3)+(2,"def",10.2) != (3,"abcdef",10.5)?
> How to elegantly achieve (3,"abcdef",10.5) as a result of addition ...

tuple([(a+b) for a,b in zip((1,"abc",0.3),(2,"def",10.2))])



More information about the Python-list mailing list