This is a text. sender@example.com
编写一个 Python 程序，从文本中提取所有的电子邮件。
import re

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

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

for email in emails:
    print(email)