In this program, we will take a string as input and extract numbers from a given string.
Steps to solve the program
- Take a string as input.
- Create an empty list.
- Split the given list using split().
- Use for loop to iterate over splitter string.
- If the value is a number then add it to the empty list.
- Print the output.
Output :