import re mail = raw_input() #mail = "123@hu.123@we.i.com" pattern_split = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*@[\w\d-]+?\.)") pattern = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*)@([\w\d-]+?)\.") res = "" for item in pattern_split.split(mail):     match = pattern.match(item)     if match:         g1 = match.group(1)         g2 = match.group(2)         if len(g2) <= 119 and len(g1) >= 3:             res += (g1[:-3:] + "***" +"@"+g2+".")         else:             res += item     else:         res += item print res 直接把输入输出就过了50%了。。。 然后这样过了,别人的代码
点赞 1

相关推荐

不愿透露姓名的神秘牛友
02-14 11:10
点赞 评论 收藏
分享
牛客网
牛客企业服务