This question has been flagged
1 Reply
9751 Views

Hi All,

 I Have Code like this, 

 am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit'])

any code line with calculation give me error :

TypeError: unsupported operand type(s) for -: 'tuple' and 'float'

any help


Avatar
Discard
Best Answer

try:

am = line2[tmp]['debit'] and line2[tmp]['debit'][0] - line2[tmp]['credit'] and line2[tmp]['credit'][0] + (l['debit'] - l['credit'])
Avatar
Discard