Syntax Error: ‘Function call’ is an illegal expression for argumented assignment.
As is probably obvious, I want to get a value in a dictionary of a key and subtract it by another number. Then I want to get a value in a dictionary of a different key and add it by the number. How can I do this without getting the error?
That is wrong in so many ways. You can never assign a function call.
I highly suggest learning the way, and understanding how errors work, so you don’t have to ask here all time, and when you do ask you know what the actual problem is. (If it says “syntax” error it is always a problem with your code alone, and has nothing to do with any libraries)
The fix would be to just do subtractFromAmount = and save it to the db as an int.
I am taking a professional Python course, and the next lecture is about just that!
I’m not sure I understand - I need to know what the value is in the database, subtract a number from it, then put that value back in the database. How can I get the database value and store it in a variable as an int and not a function call?