I am trying to open a file in python in read mode then write striped and split data to an output file. I am unsure how to split and strip the same data. Do I need to create a different line? Do I need to write the data out first? The code has both but I get an error.
What I currently have
input_file = open(inpath,"r") lines = input_file.readlines() for line in lines.split(','): line = line.strip()
AttributeError: list' object has no attribute 'split