📜  python脚本对文件内容进行排序 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:29.264000             🧑  作者: Mango

代码示例1
with open('shopping.txt', 'r') as r:
    for line in sorted(r):
        print(line, end='')