How to extract a column from a txt file in python?

Viewed 16

I have a txt file and I want to create a dictionary with the column values of column 1 and column 11. How do I do that? This is what I have so far

with open('CSB/data/Singh2015_data.txt', 'r') as f:
    for row in f:
        my_line = row['Line']
        my_status = row['InfectionStatus']
0 Answers
Related