complex if statement in python

后端 未结 5 897
我寻月下人不归
我寻月下人不归 2021-02-11 17:47

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:

5条回答
  •  借酒劲吻你
    2021-02-11 18:14

    if
      ...
      # several checks
      ...
    elif not (1024<=var<=65535 or var == 80 or var == 443)
      # fail
    else
      ...
    

提交回复
热议问题