I am a beginner going through the complete python mastery course and I am encountering a syntax error when I try to follow along with the debugging lesson (video 9 under functions).
I am currently using python 3.11.0 and VS Code version 1.73
the code I am copying from the lesson is:
and this is the error I have been getting:
Traceback (most recent call last):
File “e:\Personal_Work\Coding\Python\app.py”, line 9, in
print(multiply(1, 2, 3))
File “e:\Personal_Work\Coding\Python\app.py”, line 4, in multiply
total *= numbers
TypeError: can’t multiply sequence by non-int of type ‘tuple’
[Done] exited with code=1 in 0.089 seconds
I am a little confused because the same code appears to work in the lesson. Is there something I am missing because this is a new version of python?
I did get it to return the proper value but only by changing line 3 from “number in numbers” to “numbers in numbers” but I do not now if this will cause me problems in the future while going through other lessons.
any insight on this will be appreciated,