原因: 运算符两边的类型分别为str和int,不能直接进行运算。 参考文章: Python——报错解决:unsupported operand type(s) for -: ‘str’ and ‘int’