[Tutor] Beginner's question

Alan Gauld alan.gauld at freenet.co.uk
Mon Aug 7 22:50:54 CEST 2006


> but did not give importance to it. I am hearing a lot about Python
> again recently. I was wondering what Python is good for and how will
> it help me, since I am already comfortable with C.

One line of Python ~= 10 lines of C
So in terms of delivering results quickly Python is much faster than 
C.
Python is also much more reliable than C since there is almost no
memory management so you don't get NULL pointers, buffer
overruns etc.

But, Python is about 5-10 times slower than C and doesn't play well
with direct memory access or hardware access, so if you need that
stick with C. Or at least write those functions in C and access them
from Python...

> Could someone tell me how Python is useful and why is it a good
> language to learn apart from C.

There is an promotional section on the python web site giving the plus 
points.
They are mostly the same plus points you find for any scripting 
language
but python adds readability, modularity and a good OOP model - 
certainly
better than C++ and java etc.

> Also please point me to a good starting point for learning Python.

If you know C just start with the official tutorial at

www.python.org

Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 



More information about the Tutor mailing list