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