Wednesday, September 1, 2010

Python Koans - A Great Way to Learn Python!

I just found out about Python Koans by Greg Malcolm (thanks dude) after listening to the from python import podcast podcast (which I find amusing, thanks guys).

It's an awesome way to learn Python. Instead of just reading tutorials and/or books you learn Python by coding.

The interactive tutorial is built around unit-tests and you advance and gain new skills by passing tests and it's really funny. You do learn a lot about the Python language when doing the Koans so I recommend it even if you've been using Python for a while.

Another cool thing is that you learn how to do unit testing in Python, if you're not already familiar with it.


tshepang said...

am looking forward to playing with it; thanks

linuxevolution said...

Me too, like i have began to learn PyGtk and working in a Team'sproject ; i'm going to look this.
That 's a real good idea.
Thanks for the beginners, the future programmers of Python. <:-)

linuxevolution said...

When you run the script there is a test done by the creator. I have the same thing that he have done in his sample but i can't pass them. An Idea perhaps ?

Mario said...

Can you tell me which test doesn't pass?

Just copy and paste the output of the test that fails.

tshepang said...

So nobody warned me that this isn't just a walk in the park (took me more than a weekend to 'complete'). It teaches some of the deeper features of Python, and isn't really suitable for beginners. It tends to get intense, and I couldn't even finish the very last exercise (too difficult for me).

Mario said...

I can agree, some parts can be/are difficult. If you fail on some tests I think you should be able to comment them out in "python_koans/python X/runner/" and then go on.

I haven't done the full test-suite myself. I do a couple of them from time to time.

Even though not all of the tests are suited for beginners, I think that most of the test at the beginning are very good and gives you "aha" experiences :)

Post a Comment