Get all the email id’s from the given string

In this program, we will take a string as input and get all the email id’s from the given string.

Steps to solve program
  1. Take a string as input.
  2. Convert the string into a list using split() and create an empty list.
  3. Using for loop iterate over each word in the string.
  4. If the character in the word contains “@” add that word to the empty string.
  5. Print the output.

Output :

print each character on a new line

get a list of all the mobile numbers from the given string

Leave a Comment