The code is erroneous because print(func(func(2)) + 1) will first become print(func(1) + 1), which will then become print(None + 1), and this will throw a TypeError because arithmetic operations are impossible between the NoneType and int.
N.B. True and False have values of 1 and 0 respectively, and those are of the boolean type (parallel scenario).
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
akumo
1 month agoOluwafemi_Akinlosotu
1 month ago