Skip to content
C

Email Extractor

Mediumpython

Given a line of text containing several email addresses, use re.findall() to extract all of them.

Approach: the pattern [\w.-]+@[\w.-]+\.\w+ matches the username part, the @, the domain, and the extension.

Input: One line: a sentence containing zero or more email addresses.

Output: One line: every email address found, printed as a Python list, in the order they appear.

Input (stdin)

Output

Run your code to see output here...