0 out of 464 challenges solved
Write a Python function that checks if a given string contains the letter `a` followed by exactly three `b` characters. The function should return `True` if the pattern is found and `False` otherwise.
#### Example Usage
```python [main.nopy]
text_match_three("abbb") # True
text_match_three("a") # False
text_match_three("abbbb") # False
text_match_three("cabbbd") # True
```
#### Constraints
- Use regular expressions to solve the problem.
- The function should return a boolean value indicating whether the pattern is found.import re
def text_match_three(text):
"""
Check if the input string contains 'a' followed by exactly three 'b' characters.
Args:
text (str): The input string to check.
Returns:
bool: True if the pattern is found, False otherwise.
"""
# Define the regular expression pattern
pattern = '' # TODO: Complete the pattern
# Use re.search to find the pattern in the text
return bool(re.search(pattern, text))