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 completeSolution
Correct Answer: C (re.fullmatch ensures the *entire* string matches the pattern, which is typically desired for validation like email. re.match only checks from the beginning, and re.search checks anywhere in the string.)
Which type of soil is suitable for cultivating rubber, cinchona, and arecanut?
Pilibhit forests area was declared as the 46th Tiger reserve of India in which of the following year?
Who clinched the gold medal at the Asian Marathon Championships in 2024?
Which state share the maximum border with Uttar Pradesh?
In Haryana state, what does SYL stands for?Â
Which Indian Bollywood star has recently received the ‘Global Icon Award’?
The current in a Photoelectric cell----------.
Which of the following ancient monuments of India of the UNESCO World Heritage Site will have a hydraulic lift system for the visitors?
Which type of waves are light waves?
What state ranked as the top electronics exporter in India during the fiscal year 2022-2023?