Python3报错:TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

Python3报错:TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

报错原因:

  • In python3, dict.values returns a dict_values object, which is not a list or tuple.

  • Python3报错:TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

解决方法:Try coercing that into a list.

Python3报错:TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'