Python Python all the way!!! :D


Ok, so i started studying python late in the 2nd semester but I did that very casually, just for about a week before pressure of semester exams got me. But, i ultimately had to take up this language seriously coz this is a topic for my summer training this year. Now, first thing i got to say that the more I see this language, the more i love it!! Its just soo cool!!! 🙂

Anyways, kushal suggested his book, ‘python for you and me‘. We were told to go through the first 6 chapters (i.e. upto loops) for the first day. That wasn’t much of a problem for me coz i already knew that part before. I studied java for my 10 and 10+2 boards, c in the 2nd semester itself, but i got to say as a first time python programmer that python is just something else! Its so full of shortcuts which will make your life a lot better, for example swapping is as simple as writing a,b=b,a. One can focus entirely on the logic not worrying about the library functions and of course, the interpreter!! So much can be learned even without writing complete programs. One can simply execute pieces of code in the interpreter.

For the second day(i.e. for today), kushal wanted us to study the next 3 chapters i.e. data structures, strings and functions.
Data structures that we learnt today are lists, tuples, sets and dictionaries. In lists, we learned methods like append(), insert(), remove(), extend(), sort(), del(), pop(). And the uses of list as stacks and queues, list comprehensions.
Set is another very interesting part, it brings the set theory into programming as a data structure. Some uses I learned are a-b, a|b, a&b, a^b.
Dictionaries was the next thing. They are basically a set of key:value pairs. I learnt how to add, delete, and check the dictionary. And also some methods like dict(), iteritems(), enumerate() and zip().


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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