New to both python, and fairly beginner in C. Why will the subject code return an error in python?
Does the assignment not have a return value?
This is simply not valid in Python. You can't use an assignment as an expression.
I am going to expand on Simeon's answer.
First off, you are putting parenthesis around an expression. If you type that into the interpreter by itself you will get a syntax error. That is because parenthesis are only defined/interpreted in context - there is no context for Python when you are using an expression within the parenthesis.
If you type (a-5) then it will attempt to resolve the expression and tell you that a is not defined. I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With