Python Challenge

OK, so I’ve been playing about with the Python Challenge. I’ve only got as far as challenge 9, but I thought some other people out there might find this little python script useful. For each challenge, there’s an associated function, do challenge 0 is solved by pc0() etc. You can run it from the command line by giving the challenge number as the argument. With no argument, it will print all the challenges it knows about, and the doc string for each, which I use for the URL so I can easily track what I’ve done. There’s also a function in there that will return a list of all the comments in the HTML page at a given URL, which saves a lot of time and copying for some of the challenges 😉

If you decide to try it out or you find it useful, please let me know.

pythonchallenge.py

Blogged with the Flock Browser

Tags: , ,

Advertisements

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