0
How to add multiple string to check a valid mail for example as not only @gmail.com ,i want to allow @outlook and @yahoo.com too
allow_domain=r"@gmail.com" if re.match((allowed_domain),"sololearn@gmail.com"): print ("valid") else print("invalid") Result: >>> valid >>>
5 Respostas
+ 2
yeah actually thats a legit way but if u wanna do only gmail outlook yahoo its gonna be a tedious r"@(gmail|outlook|yahoo)\.comquot;
+ 1
r"@.+\.com" lol
0
@cheese....lol
0
ok ,dude let me try
0
first of all thanks @cheese...yeah i know its tedious , but it making me curious so i asked