成功解决AttributeError: module 'string' has no attribute 'find'
生活随笔
收集整理的這篇文章主要介紹了
成功解决AttributeError: module 'string' has no attribute 'find'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決AttributeError: module 'string' has no attribute 'find'
?
?
目錄
解決問題
解決思路
解決方法
?
?
?
解決問題
AttributeError: module 'string' has no attribute 'find'
?
?
解決思路
屬性錯誤:模塊“string”沒有屬性“find”
?
?
?
?
解決方法
因為python版本升級,函數名稱已有改變!只需要將string改為str即可!
if str.find(big_string, substring) != -1:return substring?
總結
以上是生活随笔為你收集整理的成功解决AttributeError: module 'string' has no attribute 'find'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: py之patsy:patsy的简介、安装
- 下一篇: 成功解决TypeError: __ini