【问题标题】:How can I append these word to array without \r\n如何在没有 \\r\\n 的情况下将这些词附加到数组
【发布时间】:2022-11-14 02:04:33
【问题描述】:

如何将此结构中的每个单词添加到数组中?

我想删除多余的引号 (\r\n)

for item in most_common_list:
    print(item[0])

【问题讨论】:

标签: python


【解决方案1】:

对字符串使用strip() 方法来删​​除空格(包括 和 )

【讨论】:

    猜你喜欢
    • 2021-02-22
    • 2018-08-27
    • 2022-10-07
    • 2013-03-04
    • 1970-01-01
    • 2017-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多