Menu
Coddy logo textTech

Valid Phone Numbers

Lesson 26 of 28 in Coddy's RegEx in Python course.

challenge icon

Challenge

Easy

Write a function named find_phone_numbers that takes a text string as input and returns a list of valid phone numbers. A valid phone number is in the format (XXX) XXX-XXXX where X is a digit.

Try it yourself

import re

def find_phone_numbers(text):
    # Write code here

All lessons in RegEx in Python