代码实现功能:

  1. 输入邮箱账号,检查邮箱格式是否正确,是否含有@字符,且以 .com结尾
  2. 输入提交文件名,检查提交的文件格式是否正确,是否以 .py结尾
email  = input("Please input your email: ")
while ( email.find("@") == -1 or not email.endswith('.com')):
    print("Wrong Email")
    email = input("Please input your email: ")
file = input("Please input your file: ")
while(not file.endswith('.py')):
    print('Wrong File')
    file = input("Please input your file: ")
print("Pass!")