Home > Python, PythonChallenge.Com > PythonChallenge – Level 3

PythonChallenge – Level 3


Homepage: http://www.pythonchallenge.com/pc/def/equality.html

How I solve:

– from the hint:

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

and reading part of data hidden inside HTML page source (which includes only either-upper-or-lower-case character, I got the rule that “to find the lowercase letters satisfying this condition“.
– So I write this small Python script to take them down:

import re
print ''.join(re.findall('[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]', open("data.txt").read()))

– Get the result as human-readable word 😀
– Reaching next level…

Cheers,
Pete Houston

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: