PYTHON CIRCLE
Practice
Python Books
Archive
Subscribe
Login
Menu
Login
Practice
Python Books
Archive
Subscribe
Python Multiple Choice Questions
Which of the following lines of code will not show a match?
A. >>> re.match('ab*', 'a')
B. >>> re.match('ab*', 'ab')
C. >>> re.match('ab*', 'abb')
D. >>> re.match('ab*', 'ba')
Show Answer
Next Question
Correct Answer:
D
Explanation: In the code shown above, ab* will match to 'a' or 'ab' or 'a' followed by any number of b's. Hence the only line of code from the above options which does not result in a match is:
© 2022-2023 Python Circle
Contact
Sponsor
Archive
Sitemap