import re
str = input("enter the string:")
# x='[A-Za-z0-9 ! # $ % & , * + - / = ? ^ _ ` { |][@][gmail/yahoo][.com/.in/.co]'
x='[a-z0-9! # $ % & , * + - / = ? ^ _ ][@]gamil/yahoo .com/.in'
match=re.fullmatch(x,str)
if(match!=None):
    print("valid")
else:
    print("invalid")
bba19cf967666848c5b20718ab8615d477b1df92
<mask token>

<mask token>
if match != None:
    print('valid')
else:
    print('invalid')

<mask token>
str = input('enter the string:')
x = '[a-z0-9! # $ % & , * + - / = ? ^ _ ][@]gamil/yahoo .com/.in'
match = re.fullmatch(x, str)
if match != None:
    print('valid')
else:
    print('invalid')

import re
str = input('enter the string:')
x = '[a-z0-9! # $ % & , * + - / = ? ^ _ ][@]gamil/yahoo .com/.in'
match = re.fullmatch(x, str)
if match != None:
    print('valid')
else:
    print('invalid')

import re
str = input("enter the string:")
# x='[A-Za-z0-9 ! # $ % & , * + - / = ? ^ _ ` { |][@][gmail/yahoo][.com/.in/.co]'
x='[a-z0-9! # $ % & , * + - / = ? ^ _ ][@]gamil/yahoo .com/.in'
match=re.fullmatch(x,str)
if(match!=None):
    print("valid")
else:
    print("invalid")