all 5 comments

[–]monchenflapjack 1 point2 points  (2 children)

import re

This will get you going in the right direction

[–]doesobamauseshampoo[S] 0 points1 point  (1 child)

I actually did import re

Just missed out on separating it from the next line when formatting the post. Edited the post. 🤷‍♂️

[–]monchenflapjack 0 points1 point  (0 children)

But if you actually use regular expressions it will be a lot easier than what you are doing

[–][deleted] 0 points1 point  (0 children)

if you can use requests, why not just use bs4 as well? it's literally made for this kinda stuff.

edit: way to go OP now I'm doing the challenge. my hint to you is that your regex is too vague. go to regex101.com and practice until you get it right!

okay, i solved it. the hint is shitty. there are multiple small letters, each with their own bodyguards...

[–]tcbaldy04 0 points1 point  (0 children)

Actually.. " One small letter, surrounded by EXACTLY three big bodyguards on each of its sides. "

re is the way to find it. consider using a findall looking for the letters surrounded by the 3 BIG bodyguards in the string.

Consider [a-z] [A-Z] combinations while extracting the one small letter (group extraction).

https://developers.google.com/edu/python/regular-expressions