Categories
Python

Python port to the Alphabet Class

I have a pretty bad habit of porting codes from one language to another. PHP and Python both are my favorites. But sometimes I feel that I enjoy coding more in Python than PHP. It’s just because I am a lazy guy who hates using text editors to complete a script entirely before executing the program. I like interactive shells. Now that I have set up interactive shell for PHP as well, I write little throw away programs in both PHP and Python. But it still happens that the Python interactive interpreter is loads better than the PHP one. I have to type “echo” every time I want some input from the PHP shell, where as I have to type the name of an element (variable, object, list, tuple or whatever) and python displays it on the shell. So it becomes easier to experiment and debug.

Back to the topic, I was thinking of porting the alphabet class I wrote in PHP to Python. And finally I got some time today morning and finished it.

How to use ?

Source Code