CPSC120A
Fundamentals of Computer Science I

Post-lab 29

File I/O

Post Lab 29

Write a function remove_non_numeric(opened_file), which takes an opened file as a parameter. Your function should return a list of lines from the file which contain only numeric digits. Your list should contain strings which are just the numeric digits, and should have all extraneous whitespace removed.

from io import StringIO # DO NOT REMOVE. NEEDED FOR TEST CASES def remove_non_numeric(opened_file):