That is a terrible title.
I’ve been working through Coursera’s bioinformatics 1 course with P.Compeau and P.Pevzner. It has a coding component on its companion stepic website.
I just spent the past half hour meticulously debugging why I was getting correct answers on the small case sets, but wrong answers on the larger test sets.. It turns out, even for txt files you have to strip() your readlines.. I’m really not sure why it does this, but readline seems to leave the \n newline character at the end, and this character counts for the length of the string as well.
Well now I know.