for i in your_list:
if i[1]<2:
your_list.remove(i)
your_list
for i in your_list[:]:
if i[1] < 2:
your_list.remove(i)
print(your_list)
from collections import Counter
import re
s = "XXXXXXAGCCTGCCAAGCAAACTTCACTGGAGXXXXXXTGTGCGTAGCATGCTAGTAACTGCAXXXXXXTCTGAATCTTTCAGCTGCTTGTXXXXXXTGGGCCTCTCACAAGGCAGAGTGTCTTCATGGGACTTTGATATTTATTTTTGTACAACCTAAGAGGAACAAATCCTTTGACACTGACAAATTGGCTTCCATATTTTATACCTTAATCATCTCCATGTTGAATTCATTGATCAACAGTTTAAGAAAAAAAGATGTAAAAATGCTTTTAGAAAGAGAGGCAAAGTTATGCACAATAACTTCTCATGAAGTCACAGTTTGTTAAAAGTTGCCTTAGTTCACAATAAATAATTATGTATGCTCTATAATTTCAGTGA"
counter = {}
n = 6
for i in range(len(s) - n + 1):
new_string = s[i:i + n]
if new_string not in counter:
matches = re.split(new_string, s)
internal_counter = len(matches) - 1
counter.update({new_string: internal_counter})
def chunk_string(s, n):
return [s[i:i + n] for i in range(len(s) - n + 1)]
wolverine_counter = dict(Counter(chunk_string(s, 6)).most_common())
for key in counter:
if counter[key] != wolverine_counter[key]:
print(key, counter[key], wolverine_counter[key])