I want to extract numbers(integers and float) from a file(exclude all special symbols and alphabets). Numbers from all positions.
import re file = open(\'input_f
Without clarification, you can try the following.
re.findall(r'[+-]?\d+(?:\.\d+)?', line)