Question

Complete the Python code to check if a string email matches a simple email pattern (e.g., [email protected]). import re def is_valid_email(email):     pattern = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"     _________ # Line to complete

A return re.match(pattern, email)
B return re.search(pattern, email)
C return re.fullmatch(pattern, email)
D return re.findall(pattern, email)
E return re.compile(pattern).match(email)
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)