if A1:
if A2 == X2:
if B1:
if B2 == Y2:
do_something()
else:
print 'B2 must equal to Y2'
else:
do_something()
else:
print 'A2 must equal to X2'
elif B1:
if B2 == Y2:
do_something()
else:
print 'B2 must equal to Y2'
else:
print 'Choose at least one between A1 and B1'
1
pktangyue 2018-04-26 16:36:22 +08:00
if not A1 and not B1:
print 'Choose at least one between A1 and B1' return if A1 and A2 != X2: print 'A2 must equal to X2' return if B1 and B2 != Y2: print 'B2 must equal to Y2' return do_something() |
2
xmadi 2018-04-26 16:41:11 +08:00 via iPhone
。。。。 这个和语法没有关系了 纯粹是逻辑归纳能力不行
|