re
.com
.co.in
import re print(re.search(r"[0-9a-zA-Z.]+@[a-zA-Z]+\.(com|co\.in)$","info@freetimelearning.com"))