diff --git a/diy.py b/diy.py new file mode 100644 index 0000000..b00aa56 --- /dev/null +++ b/diy.py @@ -0,0 +1,6 @@ +new_data'' +with open(r'C:\Users\Administrator\Desktop\test.txt','a',encoding = 'utf-8') as file1: + for data in file1: + if '小强:10本' in data: + data=data.replace('小强:10本','小强:11本') + new_data +=data \ No newline at end of file