I'm a beginner py.
I need to extract the contents of column 12 from a huge flat text file every time a certain word is found within the text file (similar to awk '{print $12}' in Bash) in a Python script.
So far I have (example, not real code):
word = a_word
for a_word in data:
column12 = data.split()
print(column12[11])
I assumed that I should start counting from 0 as opposed to 1, though I very well may be incorrect.
Also, is a for loop correct for this type of code?
Thanks!