Follow

Answer 

@RecursiveNeuron I'm going to guess it's an error, because Python doesn't have the ++ operator.

If it turns out Python added it when I wasn't looking, and it behaves like other languages, it will print 3 twice.

Testing it out on Python 3.10.1, I'm surprised to learn that Python has a unary + operator, which (in this case) does nothing. The code therefore prints 2 twice.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.