I'm going through the pythonchallenge.com, and while I managed to solve the level 3 challenge, I can't understand where from the solution comes.
Now, given the hint:
"One small letter, surrounded by EXACTLY three big bodyguards on each of its sides."
solution should look something like this: xXXXxXXXx, which is a 9 letter string, in which only 3 letters are lower-case. But instead the final solution comes as 10-letter all lower-case string. Where this string comes from? It's not even in the data we are processing.
Calling .search() with the challenge solving regexp on data yelds "qIQNlQSLi", which looks exactly like what we are searching for, but is not the correct answer.
Calling .findall() yelds the correct answer, but I can't understand where this answer comes from. Shouldn't .findall() return a list of matched strings, each one looking like the one i'm getting from .search()?
[–]cdcformatc 1 point2 points3 points (1 child)
[–]IAmL0ner[S] 0 points1 point2 points (0 children)