Home:ALL Converter>Python TypeError unsupported operand type

Python TypeError unsupported operand type

Ask Time:2012-12-15T07:13:00         Author:NullException

Json Formatter

In Python,

logging.info('Followers: %d ', sum([a[1] for a in total])), where sum is an integer and total is list comprehension of integers. I get this,

TypeError: unsupported operand type(s) for +: 'int' and 'str' ?? Not sure, why ??

Author:NullException,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/13887537/python-typeerror-unsupported-operand-type
yy