Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
11448 Vistas

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
Descartar
Mejor respuesta

try:

am = line2[tmp]['debit'] and line2[tmp]['debit'][0] - line2[tmp]['credit'] and line2[tmp]['credit'][0] + (l['debit'] - l['credit'])
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 22
9099
1
jun 21
2382
2
feb 21
299
5
sept 20
14261
4
jun 20
49659