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
- Take a string as input.
- Convert the string into a list using split() and create an empty list.
- Using for loop iterate over each word in the string.
- If the character in the word contains “@” add that word to the empty string.
- Print the output.
Output :