TypeError: unsupported operand type(s) for //: ‘str‘ and ‘int‘
生活随笔
收集整理的這篇文章主要介紹了
TypeError: unsupported operand type(s) for //: ‘str‘ and ‘int‘
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
當(dāng)出現(xiàn)這種錯(cuò)誤時(shí),要知道input()函數(shù)輸入的是str類型
只要將輸入改成你需要的類型就好了
eg:a=int(input())
這樣a就變成int 類型的了
總結(jié)
以上是生活随笔為你收集整理的TypeError: unsupported operand type(s) for //: ‘str‘ and ‘int‘的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 沃尔玛erp系统功能分析
- 下一篇: 考研资料分享——百度网盘获取