Representing mathematical equations

Rustom Mody rustompmody at gmail.com
Mon Oct 6 14:06:17 EDT 2014


On Monday, October 6, 2014 11:18:55 PM UTC+5:30, Rustom Mody wrote:

> >>> sum([(x,y) for (x,y) in L])
> Traceback (most recent call last):
> TypeError: unsupported operand type(s) for +: 'int' and 'tuple'

> Python just expressing that you are goofing off by trying to add tuples
> rather than numbers

I forgot to mention that this comes from just taking your
denominator
term  "Σ(l∈L) l" literally.



More information about the Python-list mailing list