complex if statement in python
- by Neverland
I need to realize a complex if-elif-else statement in Python but I don't get it working.
The elif line I need has to check a variable for this conditions:
80, 443 or 1024-65535 inclusive
I tried
if
...
# several checks
...
elif (var1 > 65535) or ((var1 < 1024) and (var1 != 80) and (var1 != 443)):
# fail
else
...