Problem scenario
You have a CSV file with email addresses. You want to return only the email address -- not lines that have an email address. What do you do?
Solution
Assuming the email addresses are in a file named email.txt, use this Python 3 program:
with open('email.txt', 'r') as a:
for b in a:
if '@' in b: #operate only on lines with "@"
c = b.split() #split up words on line
for d in c: #iterate through characters of words
if '@' in d: #if email address,
print(d+';') #print email address