If I have a file that has a content of this kind:
I need to make a list of the letters in the first column, i.e., [a, c, e, g]. I wrote some code which prints these letters but I don't know how to put them into a list. Here is the code:
def file_to_dict(f): for line in f: columns = line.split(",") print columns
Your help is appreciated.