In this program, we will take a string as input and get a list of mobile numbers from the given string.
Steps to solve the program
- Take a list as input.
- Convert the string into a list using split() and create an empty list.
- Use for loop to iterate over every word in the list.
- If the length of the word is 10 and that word contains all numbers then add that word to the empty list.
- Print the output.
Output :
get all the email id’s from given string