What's the Python equivalent of C++'s "a = f++;", if any?
In C++, two things can happen in the same line: something is incremented,
and an equality is set; i.e.:
int main() {
int a = 3;
int f = 2;
a = f++; // a = 2, f = 3
return 0;
}
Can this be done in Python?
No comments:
Post a Comment