user
Write a python program that extracts all emails from a text.
This is a text. sender@example.com

Response:
assistant
import re

text = "This is a text. sender@example.com"

emails = re.findall(r'[\w\.-]+@[\w\.-]+', text)

for email in emails:
    print(email)