Guest User

Untitled

a guest
Feb 11th, 2019
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. user_list = ['ravi.teja', 'teja.ravi', 'arun.kumar']
  2.  
  3. email_ids = ['ravi.teja@gmail.com', 'teja.ravi@gmail.com', 'arun.kumar@gmail.com']
  4.  
  5. for i in user_list:
  6. username = i
  7. for e in email_ids:
  8. em = e.split("@")[0]
  9. if username == em:
  10. send_email(i,em) """ I need to select the email based on the condition to send email only to the match i.e ravi.teja == ravi.teja send email to ravi.teja@gmail.com or teja.ravi == teja.ravi send email to teja.ravi@gmail.com
  11.  
  12. can some one help me how to select an email_address if the firstname and the last name in the email id matches the exact string."""
Add Comment
Please, Sign In to add comment