Skip to content
Advertisement

Subtracting from inner list

There is 5 fundraising projects, and the purpose of this program is to substract the amount of money that each of n donators will donate from the desired sum of each project

The program partially work, but sometimes python typing “TypeError: ‘NoneType’ object is not subscriptable” and the programm fall

What can cause this crash?

Thank you for your help!

enter image description here

JavaScript

Advertisement

Answer

You need to reassign the value which you can do with the -= notation:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement