try:
file=open('mm','r')
except Exception as e: //这是固定形式
print('there is no file named as mm')
response=input('do you want to creat a new file')
if respones=='y':
file=open('mm','w')
else:
pass
else:
print('eee')
try:
file=open('mm','r')
except Exception as e: //这是固定形式
print('there is no file named as mm')
response=input('do you want to creat a new file')
if respones=='y':
file=open('mm','w')
else:
pass
else:
print('eee')