这么写行不行?
months = set(['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'])
x1 = raw_input()
if x1 in months:
print 'x1: ok'
else:
print 'x1: error'
months = set(['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'])
x1 = raw_input()
if x1 in months:
print 'x1: ok'
else:
print 'x1: error'
2016-09-06
举报