I am working on a text proccessing project, actually related to protein sequences. I want to list occurrences of a search term with the hit positions. I tried the following, but it only gives it for the first hit.
text = 'MSKSASPKEPEQLRKLFIGGLSFETTDESLRSAHFESSSYGSAGRRF' index = text.find('SA') print index
is it possible to get all hits and their positions?
thanks a lot