[Tutor] Consecutive Sequence

syed zaidi syedzaidi85 at hotmail.co.uk
Sat Oct 13 13:02:20 CEST 2012


Hi,I am trying to develop a python code that takes a character string as input and  finds for the occurrence of letters that are occurring thrice or more consecutively.For E.g.
a = 'atttttaattaaacagagtgagcagaaaat'In the output I want a list of those characters that are occuring thrice or more.
like in this case outout must b out_put = ['ttttt','aaa','aaaa']
Can someone please suggest a code for this. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121013/8aa14077/attachment-0001.html>


More information about the Tutor mailing list