# 1) pick elements with length > 3
# and with first and last letter the same
l = ['', 'xyzzz', 'aabddda', 'xyx', 'bbbb']
# 2) remove the duplicates in the following list
l = [1,2,2,3,3,5,4,1,1,1]
Extract taxonomy information from taxonomy file;
Each line contains two fields separated by a tab:
sequence name
taxonomy (including 6 taxon levels separated by ';')
In this exercise, we will count frequncy of domains (first level taxon, "Bacteria in the example bellow)
e.g. Bacteria;Proteobacteria;Alphaproteobacteria;Rhodospirillales;Da111;
!wget http://lyorn.idyll.org/~gjr/public2/swc/1k.taxonomy
# collect unique
unique_list = []
# collect all
all_list = []
for line in open('1k.taxonomy'):
# +++add your code+++
# count unique, hint: list.count
# +++add your code+++