0 out of 464 challenges solved
Write a Python function `text_match_wordz` that checks if a given string contains a word with the letter 'z'. A word is defined as a sequence of alphanumeric characters separated by spaces or punctuation.
#### Requirements
- The function should return `True` if the string contains a word with the letter 'z'.
- Otherwise, it should return `False`.
#### Example Usage
```python [main.nopy]
text_match_wordz("The zebra is fast.") # Returns: True
text_match_wordz("Hello world!") # Returns: False
text_match_wordz("Crazy examples.") # Returns: True
```
#### Constraints
- Case sensitivity is not required (e.g., both 'z' and 'Z' should match).
- Words can be surrounded by punctuation but must include 'z' to be valid.import re
def text_match_wordz(text):
"""
Check if the given text contains a word with the letter 'z'.
Args:
text (str): The input string.
Returns:
bool: True if a word with 'z' is found, False otherwise.
"""
# TODO: Implement this function
pass