-2

Do you guys know how I'll be able to extract an email from a string using find()

info = "message email@gmail.com"

I want to be able to get the entire "email@gmail.com" and output only that to the screen.

1 Answers1

0

You can do this by using regex:

import re
emails_list = re.findall('\S+@\S+', info) 
Chayan Bansal
  • 1,857
  • 1
  • 13
  • 23