匹配指定后缀邮箱格式
import re email = input("Enter your email:\n") result = re.match(r".*@(163|qq|126|sohu)\.com",email) print(result) if result: print(email) else: print('您注册的邮箱不满足系统要求!')