Write a program that will take user input. If it begins with a letter b and ends with a letter l, the program should print the matched output, or print No match otherwise. Note that user input can contain non-alphanumeric characters, newlines, and whitespaces. Make your program case-insensitive.
Regexp flags in Python
Looking for specific strings
Report a typo
Sample Input 1:
base\nball ballSample Output 1:
base\nball ballWrite a program in Python 3
import re
string = input()
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.