Question: def read _ customer _ data ( filename ) : Read and return data from filename as a list of lists (

def read_customer_data(filename): """Read and return data from filename as a list of lists (name, state, debt)""" names =[] states =[] debts =[] with open(filename) as f: rows = f.readlines() for row in rows: row = row.split(',') names.append(row[0]) states.append(row[1]) debts.append(float(row[2].strip())) return names, states, debts # Main portion of the program if __name__=='__main__': # number of rows to consider num_customers = int(input()) names, states, debts = read_customer_data("CustomerData.csv") # Type your code here.
 def read_customer_data(filename): """Read and return data from filename as a list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!