In python, I could write:
a = 1
if a in [1, 2]:
do something...
In c (and many other languages):
int a = 1;
if (a == 1 || a == 2) {
do something...
}
Is there a shorter, cleaner syntax?
a = 1
if a in [1, 2]:
do something...
In c (and many other languages):
int a = 1;
if (a == 1 || a == 2) {
do something...
}
Is there a shorter, cleaner syntax?
Comment