Commit 4441f876 by BellCodeEditor

save project

parent 7bce646f
Showing with 8 additions and 13 deletions
filtre1=(r'C:\Users\Administrator.SC2206-2023UCRO\Desktop','w',encoding='utf-8')
filter1.wrirt('小兰:12本')
filter1.close()
with open(r'C:\Users\Administrator.SC2206-2023UCRO\Desktop','w',encoding='utf-8') as file:
file.write("小强:13本")
with open(r'C:\Users\Administrator.SC2206-2023UCRO\Desktop','w',encoding='utf-8') as file:
for data in file:
if "小强:13" in data:
print("数据在")
new_data +=data
with open(r'C:\Users\Administrator.SC2206-2023UCRO\Desktop','w',encoding='utf-8') as filel:
filel.write(new_data)
\ No newline at end of file
class Hero:
def __init__(self):
self.level=1
self.hp=200
self.attack=20
yase=Hero()
print(ya.hp)
\ 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