DevJourney · code I wrote while learning

String has a followed by 1 or more bs.py

209 B
import re

str = input("Enter a string: ")
rePat = r"ab+"
if re.findall(rePat, str):
    print("String has an a followed by 0 or more bs")
else:
    print("String does not have an a followed by 0 or more bs")