Python list .extend method breaks string into characters
This question already has an answer here:
list.extend
extends the list with each of the items in the iterable you pass. A string is an iterable of characters, so it appends the characters.
Easier to use list.append
here.
上一篇: 将子列表作为对象而不是列表复制到主列表中