<分区> 分区>
我正在尝试将列表中的元素转换为小写。这就是它的样子。
print(dataset)
[['It', 'went', 'Through', 'my', 'shirt', 'And', 'came', 'out', 'The', 'back', 'and', 'hit', 'the', 'kid', 'behind', 'me', 'in', 'the', 'toe']]
我试过这样做:
for line in dataset:
rt=[w.lower() for w in line]
然而,这给了我一个错误,说列表对象没有属性 lower()。
