Commit 4b78961e by BellCodeEditor

save project

parent cd4df6af
Showing with 7 additions and 3 deletions
new_data=''
with open("C:\\Users\\1\\Desktop\\File Explorer.txt",'r',encoding='utf-8') as f: with open("C:\\Users\\1\\Desktop\\File Explorer.txt",'r',encoding='utf-8') as f:
for i in data: for data in files:
if '小强10本' in data: if '小强:10本' in data:
print('小强在数据中') data=data.replace('小强:10本','小强:11本')
new_data += data
print(new_data)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment