In no particular order:

  • string.maketrans is good for implementing simple substitution ciphers.
  • A brief introduction to regular expressions, and generally a variety of built-in modules.
  • Recognizing the preamble bytes for bzip, zlib, PNG, and JPEG.
  • You will love the Python Imaging Library.
  • List operations, list comprehensions (but not necessarily generator expressions), the element selection parameter (i.e. foo[::3] selects every third element, foo[::-1] returns a reversed list).
  • File I/O, StringIO. And somewhere along the line, manipulating byte streams as strings and such.

In terms of game specific lessons, which are really just tips:

  • You can embed arbitrary data into an image.
  • Conversely, you can embed an image in just about anything. When in doubt, try to turn the data in front of you into an image. If you have an image, particularly if it’s large, look for an image that’s embedded.
  • PNG and GIF can compress losslessly, but JPEG cannot. While not always a rule, chances are good that when encountering a PNG or GIF, you should do something with that image. See above, but again it’s not always the rule.
  • Keep logs of your steps. They sometimes contain information as well.
  • You should load puzzle pages with Python, or at least have Firebug running. Preferably both, as they reveal things that don’t render in the browser. No, I’m not talking about HTML comments although there are those too.
  • Sometimes, Python is not the best answer. Shocker, but I can’t be bothered to use smtplib when GMail will do.
  • But other times, python is the answer.
  • On that track, if the problem in front of you is non-trivial, and someone has solved it and packaged it into an easy to use web application, just use the web app. I could have slogged away at a solution over a couple of weeks, but I just wanted to get to the last level.

That’s about it. Google can give you solutions for levels up to 24, but resist the temptation if possible. At the very least, try to write and run your own code based on the solution scripts that you see. This is supposed to be an educational experience, and there’s no prize at the end, as stated on the challenge site. You’ll learn absolutely nothing by just entering in the solution URL’s, but I am also a strong believer in the idea that you cannot learn from a puzzle by osmosis. At least books tell you stuff, but a puzzle only tells you something after you’ve solved it.

If you’re so inclined to attempt the Python Challenge and get stuck, you can drop me a comment here, or just sign up and post for help on the hint forums, and I can send you a private message.

Tags: , ,
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>