Skip to content

Category Archives: Python

I’m a little scared…

For the past week+ I’ve been reading Programming in Objective-C. That’s not the scary part. The scary part is that I’m thoroughly enjoying it and I might actually like Objective-C better than I like Python. At least so far. “How can that be?” you may ask. “Python’s syntax is so [...]

Python Playing

The other day in IRC, I was having fun with typing things backwards. I decided to write a Python script to automate my silliness. I came up with this one-liner:
print ”.join([x for x in reversed(raw_input("String here: "))])
Josh came up with this one-liner:
print “stringtoreverse”[::-1]
The main problem with my script is that it uses “reversed()”, [...]

A Google of Pythons

I wish I were talented enough to work at Google and sit around having conversations like this one, which Guido recounted on python-dev:

Over lunch with Alex Martelli, he proposed that a subclass of dict with this behavior (but implemented in C) would be a good addition to the language. It looks like it wouldn’t be [...]

Python Challenge

In an effort to find something to focus my efforts on, I decided to revisit the Python Challenge. I was able to make it through three of the challenges yesterday, bringing me up to Level 12. In solving those 3 levels, I was reminded of why I gave up in the first place. [...]