怎么把input里面用户输入的值变成string类型呀?
month = set(['jan','fed','mar','june','july','aug','sep','oct','nov','dec']) coms=input('请输入要查询的月份(英文简写):')#我这个必须要输入加引号的'jan'才能正确输出,不加引号就报错,说我输入的类型错误 if coms in month: print'输入正确' else: print'输入错误'
month = set(['jan','fed','mar','june','july','aug','sep','oct','nov','dec']) coms=input('请输入要查询的月份(英文简写):')#我这个必须要输入加引号的'jan'才能正确输出,不加引号就报错,说我输入的类型错误 if coms in month: print'输入正确' else: print'输入错误'
2019-12-20
举报