我是python的新手,我想创建一个switch case,其中case可以将间隔作为条件,例如:
switch = { 1..<21: do one stuff, 21...31: do another }
我怎样才能达到这个结果?
python switch-statement python-3.x
python ×1
python-3.x ×1
switch-statement ×1