Didn't find a similar question. Say I have an array count, in C++ I can write an if statement like
if (--count[i] < 0) {
return -1;
}
but in Python I have to do
if count[i] - 1 < 0:
count[i] -= 1
return -1
Just wonder if there is a better way or more concise way to write this python code. Thanks!