报错:AttributeError: 'str' object has no attribute 'append'

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_44555296/article/details/102740307

Here Insert Picture Description
read () method can read all the documents, but if you want to add this to the list the entire contents of the case, the premise is the need to traverse out all strings in the document, the methods used are splitlines (): returns to a divided line as a list of elements,

Guess you like

Origin blog.csdn.net/weixin_44555296/article/details/102740307