<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Python script to find repeats in the DNA sequence !]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/44453/python-script-to-find-repeats-in-the-dna-sequence?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/44453/python-script-to-find-repeats-in-the-dna-sequence?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/44453/python-script-to-find-repeats-in-the-dna-sequence</guid>
	<pubDate>Thu, 01 Feb 2024 01:57:25 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/44453/python-script-to-find-repeats-in-the-dna-sequence</link>
	<title><![CDATA[Python script to find repeats in the DNA sequence !]]></title>
	<description><![CDATA[<code>def find_repeats(sequence, min_repeat_length=3):
    repeats = []
    
    for i in range(len(sequence) - min_repeat_length + 1):
        substring = sequence[i:i+min_repeat_length]
        
        if sequence.count(substring) &gt; 1 and substring not in repeats:
            repeats.append(substring)
    
    return repeats

# Example usage
genome_sequence = &quot;ATCGATCGATCGATCG&quot;
result = find_repeats(genome_sequence)

print(&quot;Repeats found:&quot;, result)</code>]]></description>
	<dc:creator>LEGE</dc:creator>
</item>

</channel>
</rss>