I'm totally novice in the field and I am trying to parse items in a specific column of a table and list them. I used to do this in awk which was very straight forward, but I don't know how to do it python. Here is the piece of code I've written:
for line in file('Stable7.txt','r'):
genefun=line.split('\t')
gene= genefun[2].rstrip()
gene.split("\n\r\t")
vdr=[gene]
print vdr
.
this put element in a separate list, while I want all items to be listed in a same list.
I'd be also grateful if someone could advise me with regard to set operations in python. If I wanna compare this list with another list how can I do it. I am looking for some command like "intersect(a,b)" in R.