#1、编写文件copy工具
# file1=input('源文件路径>>: ').strip()
# file2=input('存取文件路径>>: ').strip()
# with open(r'{}'.format(file1),mode='rt',encoding='utf-8') as f1,\
# open(r'{}'.format(file2),mode='wt',encoding='utf-8') as f2:
# res=f1.read()
# f2.write(res)
#2、编写登录程序,账号密码来自于文件
# inp_username=input('请输入用户名: ').strip()
# inp_password=input('请输入密码: ').strip()
# with open('user.txt',mode='rt',encoding='utf-8') as f:
# for line in f:
# # print(line,end='') # egon:123\n
# username,password=line.strip().split(':')
# if inp_username == username and inp_password == password:
# print('登陆成功')
# break
# else:
# print('账号或密码错误')
#3、编写注册程序,账号密码来存入文件
# name=input('your name>>: ')
# pwd=input('your name>>: ')
# with open('db.txt',mode='at',encoding='utf-8') as f:
# f.write('{}:{}\n'.format(name,pwd))