为什么这样写是错误的呀?
months = set([1,2,3,4,5,6,7,8,9,10,11,12)
x1 = 1
x2 = 'sun'
if x1 in months:
print 'x1: ok'
else:
print 'x1: error'
if x2 in months:
print 'x2: ok'
else:
print 'x2: error'
months = set([1,2,3,4,5,6,7,8,9,10,11,12)
x1 = 1
x2 = 'sun'
if x1 in months:
print 'x1: ok'
else:
print 'x1: error'
if x2 in months:
print 'x2: ok'
else:
print 'x2: error'
2016-11-10
举报