条件很大

时间:2019-02-22 14:49:16

标签: python

我有很大一部分代码Python,而我想做得更少。请帮帮我。 var.column =(2,3,5,6,... 22);

if val.column == 2 or val.column == 3 or val.column == 5 \
            or val.column == 6 or val.column == 7 or val.column == 8 or\
            val.column == 9 or val.column == 10 or val.column == 11 or val.column == 12 \
            or val.column == 13 or val.column == 18 or val.column == 19 \
            or val.column == 20 or val.column == 21 or val.column == 22:

0 个答案:

没有答案