تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
11449 أدوات العرض

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


الصورة الرمزية
إهمال
أفضل إجابة

try:

am = line2[tmp]['debit'] and line2[tmp]['debit'][0] - line2[tmp]['credit'] and line2[tmp]['credit'][0] + (l['debit'] - l['credit'])
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 22
9099
1
يونيو 21
2382
2
فبراير 21
299
5
سبتمبر 20
14261
4
يونيو 20
49659