标签:between span 修改 类型 error birt pre ror col
<不支持str实例和int实例之间的对比
birth是str类型
2000是int类型
所以无法对比,报错
1 birth = input(‘birth: ‘) 2 if birth < 2000: 3 print(‘00前‘) 4 else: 5 print(‘00后‘)
修改为:
1 s = input(‘birth: ‘) 2 birth = int(s) 3 if birth < 2000: 4 print(‘00前‘) 5 else: 6 print(‘00后‘)
TypeError: '<' not supported between instances of 'str' and 'int'
标签:between span 修改 类型 error birt pre ror col
原文地址:https://www.cnblogs.com/denggelin/p/8946618.html