Skip to Content
Menu
This question has been flagged
1 Reply
10200 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
Related Posts Replies Views Activity
2
Jul 22
7405
1
Jun 21
1058
2
Feb 21
299
5
Sep 20
12742
4
Jun 20
48215