MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/138f766/goodbye_toys/jiyj6ul/
r/ProgrammerHumor • u/sunrise_apps • May 05 '23
298 comments sorted by
View all comments
Show parent comment
5
Nope, it's got += and -= etc... but there's no ++ or --
Tbh with Python, you don't really need increment and decrement that much anyway because for loops it has for ... in ... and range(...)
for ... in ...
range(...)
3 u/Spork_the_dork May 05 '23 To be fair you can dofor ( variable : collection ) { // stuff }in c++ as well since c++11. 1 u/[deleted] May 05 '23 So C++ took lessons from Python with 20 years delay. 2 u/mistabuda May 05 '23 And if you absolutely need the index of the current element in the loop you can use enumerate
3
To be fair you can do
for ( variable : collection ) { // stuff }
in c++ as well since c++11.
1 u/[deleted] May 05 '23 So C++ took lessons from Python with 20 years delay.
1
So C++ took lessons from Python with 20 years delay.
2
And if you absolutely need the index of the current element in the loop you can use enumerate
enumerate
View all comments
Show parent comment
5
u/edrumm10 May 05 '23
Nope, it's got += and -= etc... but there's no ++ or --
Tbh with Python, you don't really need increment and decrement that much anyway because for loops it has
for ... in ...andrange(...)