MaxwellDuan 发表于 2021-1-19 17:24:14

往文件中的每一行添加字符串

请教大神:
源文件如下
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVYAAACrCAYAAAA91LTwAAAcCklEQVR4Ae2dWXMdRZbH79fgfR7mK0ifoLeXjv4AxDyMehYaeJjmoemImZ6GZhqmkRh67AFsGmjTLG42YwtsvMqLkI12S5Z0rcWy5L2NMTsdzZnIzMqqk1kna7slcUv6K0Jxq7JyOeeXmf86lVW3buu+++4j/IEACIAACNRHoAVhrQ8magIBEAABRQDCinEAAiAAAjUTgLDWDBTVgQAIgACEFWMABEAABGomAGGtGSiqAwEQAAEIK8YACIAACNRMAMJaM1BUBwIgAAIdC+vL775Px0Y+ornlS/Tfz++hu599TllpQA4CIAACW51AJWG9/eXXdLS9So8OPE0vvXeEdr76Bj3xzG7609BZ+s8nnqSd+w5S/8t76dEdz9GOD07Tfzz+JD366ju0a3iSjs7O0vLsia3OFf6BAAhsYwKlhfVbIlq9+zm9OLFAT7+8l45Mz9EbQx/SrnfeoyPty/T4i6/Qn0YmaefBE/TYq+/QH8YW6KH/e4F+deA4PX5qgnYeOkjv7HlkGyOH6yAAAludQGlh/eZvf6P2x5/SntkVmrl5h+ZufULTN+7Q6NXbNLx+i05cvkmHVq7Ru4tXaO/8ZZ1v99QSPX56ih4/OU5P7XubnnrkH7Y6V/gHAiCwjQmUFtZPvv6Gpm7eoTcXLtP09ds0c+MOTVy9TWfXb9Gp1Rt0ZOUaDS6u09sLl+m1C5foxfNL9Mz4RfrNiXF68tQEPTv47hYV1jYN9PbSQNuOpkHqa7WolfXfO0BxdlvM+VR18Dqdgzk7qmwfDebkwmEQAIH6CZQW1iuffkln1m/RB8tX6cPldTqzvEZDi6t0ZOESvXdhmd6ZWaS9Uwu0Z3yOnh+dpR0j5+nJ05P0i8GT9LujI/TCe/sKC2t7oJdafQ2ShvYA9bZaVMjkwT5qRcKq/cwS4NCxzIYgrPVPF9QIAsUIlBbWhduf6kt9Ja5jV27Ruf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GG19UQnhlx/UoYhAQRAAARKE8gU1vz1SEHomAmFhVULHhPQoAAK7WUuBUT54yUGf58Zi00QAAEQqIlAhrB60Z7YYFae4iKmBZhHvSFhjURUWmMV12cF0S0s9qK/SAQBEACBfAIZwlpQGK0IxlGhatQKrvfcqRI6LqBxPn8N15Zn6badwM0rvf7K67b5HbuUbZFfzhIDHrfKHyrIAQIgUJRAWFgjYUrWPbOqtEKYvFhFjCD1k1W9FN+EarUoXL8VQFunEtkojQsoi0pNNGrze08PeOaXyesVxS4IgAAIZBIIC2tmMRwEARAAARAIEYCwhsggHQRAAAQqEoCwVgSHYiAAAiAQIgBhDZFBOgiAAAhUJABhrQgOxUAABEAgRADCGiKDdBAAARCoSADCWhEcioEACIBAiACENUQG6SAAAiBQkQCEtSI4FAMBEACBEAEIa4gM0kEABECgIgEIa0VwKAYCIAACIQIQ1hAZpIMACIBARQIQ1orgUAwEQAAEQgQgrCEySAcBEACBigQgrBXBoRgIgAAIhAhAWENkkA4CIAACFQm07n/ggYpFUQwEQAAEQEAi0PrHn/6zlI40EAABEACBigRa//Qv/1qxKIqBAAiAAAhIBFr3/ex+KR1pIAACIAACFQm07n/gwYpFUQwEQAAEQEAigKcCJCpIAwEQAIEOCEBYO4CHoiAAAiAgEYCwSlSQBgIgAAIdEICwdgAPRUEABEBAIgBhlaggDQRAAAQ6IABh7QAeioIACICARKB1zw9/KKUjDQRAAARAoCKB1t//5CcVi6IYCIAACICARKD1dz/+sZSONBAAARAAgYoEWvf86EcVi6IYCIAACICARADCKlFBGgiAAAh0QAA3rzqAh6IgAAIgIBGAsEpUkAYCIAACHRBo3fODH3RQHEVBAARAAAR8AhBWnwj2QQAEQKBDAhDWDgGiOAiAAAj4BFr3fP/7fhr2QQAEQAAEOiAAYe0AHoqCAAiAgESgdc/3vielIw0EQAAEQKAiAQhrRXAoBgIgAAIhAhDWEBmkgwAIgEBFAv8P/fPp9Occ3+cAAAAASUVORK5CYII=
想在每一行末尾添加abc,但结果是如下,变成了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6FjzJxevdb0f8bgCvoAd/h3sUObRZqveeW26An1gTs+HMakAFehQgGB2iMWgVGArBQjmVkozHyrQoQDB7BCLQanAVgoQzEEGh27hfyvRmQ8VqClAMAlmrY3w+g4KEEyCuUOzY5Y1BQgmway1EV7fQQGCSTB3aHbMsqZABczX8M/9PvxjTH8rZ7BX3LJFpSsc/Ckpw+/3UqAC5vfrFs/bRDhfz2GXuJ1qEsxOwRh8dQXqYIoJewE2J98O6Qhmh1gMuokCbWCKKXMg2Stuo4QEs1EoBttMgXYwxaS9AJuTb4OUBLNBJAbZVIE+MMW0OZDsFbciKcGsCMTLmyvQD6aYuBdgc/I1pCWYhji8tIsC08AUU78e00dc94pbkJhgFoTh17spMB1MMXkvwObkm5GaYGZE4Ve7KjAPTDF9DiR7xU0kJ5iJIDzdXYH5YA7D8N/zPvzv9hj+nVCcveJqUwmmVoPHR1BgPph7eb05+SbKE8xEEJ7ursA8MOfAsVfcjOQEMyMKv9pVgelg7gXWnHwLUhPMgjD8ejcFpoE553niXnENiQmmIQ4v7aJAP5h7gTUn34q0BLMiEC9vrkAfmHPg2Ctug6QEs0EkBtlUgXYw9wJrTr6NUhLMRqEYbDMF2sCcA8decTskJJgdYjHoJgrUwdwLrDn5dkpHMDsFY/DVFaiAude6PXPy7deMYPZrxhjrKlABc93Mj5I6wTxKTdAOKEAwuXwl2gI/D6QAwSSYB2qONAUKEEyCibbAzwMpQDAPVBk0hQpAgdufP38G/lMDtoFjtYHb79+/B/5TA7aBY7WB29+/fwf+UwO2gWO1AYLJHyb+MB+wDRDMA1YKvdexvNce9UEwCSY95gHbwP8Btb6degBMUC8AAAAASUVORK5CYII=

代码如下:
f = open(r"D:\1.txt","r+")
for eachline in f.readlines():
    eachline = "".join()
    print(eachline)


请帮忙看看

qq1151985918 发表于 2021-1-20 04:57:52

print(text.replace("\n" ,"abc\n"))

逃兵 发表于 2021-1-20 10:41:38

f = open(r"D:\1.txt","r+")
for eachline in f.readlines():
    print(eachline.strip('\n')+'abc')

曼查克 发表于 2021-1-21 08:44:38

eachline的结尾应该是\n吧,你在\n后面加字串自然就加到下一行去了吧。
页: [1]
查看完整版本: 往文件中的每一行添加字符串