Import the data file Use curl to import the data set from the following link:
https://raw.githubusercontent.com/mtwood2/python1/main/us_covid_data.txt
store the file as covid.txt
Create a Function to Process the Data
create a function called process_data() that takes no parameters
Inside the function:
create a list to store the data as a list and initialize it
open the file in read only mode
The first line contains headings. Read it, but do not enter it into the list
read the data line by line while removing leading whitespace and new line characters using a loop and the .readline() function
close the file
return the list of data
Test the function by calling the function in your main code and printing the results
question from:https://stackoverflow.com/questions/65602518/how-we-can-create-this-function-in-python