You are not logged in.

#1 2010-05-31 19:47:30

paldepind
Member
From: Århus, Denmark
Registered: 2010-02-17
Posts: 141

Best way to learn Python?

I recently tried to learn Python with a book called "Learning Python." But I gave up because the book almost bored me to dead and was very slow paced.

So now I'm looking for another way to learn Python. It doesn't matter if it's a book or a website or whatever as long as it teaches me Python big_smile

Offline

#2 2010-05-31 20:07:16

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Best way to learn Python?

I'm not a python person but this looks interesting:

http://www.pythonchallenge.com/


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2010-05-31 20:23:11

vkumar
Member
Registered: 2008-10-06
Posts: 166

Re: Best way to learn Python?

@loafer: That's not how you want to learn python..
I found Learning Python to be a really comprehensive and excellent book, but if you want something more fast-paced, there's always "Dive Into Python".


div curl F = 0

Offline

#4 2010-05-31 20:27:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,306

Re: Best way to learn Python?

Are you a programmer already?  if so, look at Dive into Python http://diveintopython.org/toc/index.html

edit Fixed Typo

Last edited by ewaller (2010-05-31 20:28:02)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2010-05-31 21:05:21

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Best way to learn Python?

ewaller wrote:

Are you a programmer already?  if so, look at Dive into Python http://diveintopython.org/toc/index.html

If not, consider Head First Programming.

If you're not committed to Python, Learning Perl is a great text for new programmers and I would recommend it since you found Learning Python boring.  They're rather... different in their approaches.

Offline

#6 2010-05-31 21:27:34

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: Best way to learn Python?

According to my perspective, the problem with books is that they are quite tedious to follow. OK, I admit I'm not an adept programmer by any means but I do have some programming background. As for python I've only gone through some chapters in "Dive into python" mentioned above (up to ch 7 if I recall correctly), but, while useful, nothing really interesting and it's really tiresome to follow it faithfully. Lately I decided to get a bit more serious with python, so I decided to give cherrypy (link) a try. I understand that is quite an unorthodox way to approach a language, however it is interesting because you actually create something while, at the same time, exploring the language. Cherrypy, of course, is just an example; there are like a dozen minimal web frameworks for python. Hell, even webapps are just an example. One might be better interested in some GUI applications, then the python bindings for gtk or qt are a nice example. The possibilities are endless.

The above of course require some prior programming experience (I mean, being familiar with the basic notions of programming). If that is not the case then, I believe, you might want to sit through the python tutorial. It will not only teach you python but programming in general.

Offline

#7 2010-06-01 03:25:21

austin.rbn
Member
Registered: 2010-01-23
Posts: 77

Re: Best way to learn Python?

I'm also in the process of learning Python, and fairly new to programming in general. What seems to be working for me, is just seeking out interesting (and easy) problems to solve by writing small programs. There are some pretty good homework problems from this MIT course that I used: http://ocw.mit.edu/courses/electrical-e … fall-2008/

Also, I like solving the Project Euler problems. However, this is just my preference. I happen to really enjoy solving homework-type problems. Aside from that, I just reference the official documentation and write simple, practical scripts whenever I can.

Last edited by austin.rbn (2010-06-01 03:26:39)


"Computer Science is embarrassed by the computer." -- Alan J. Perlis

Offline

#8 2010-06-01 07:31:09

paldepind
Member
From: Århus, Denmark
Registered: 2010-02-17
Posts: 141

Re: Best way to learn Python?

Thanks for all the answers. I'm reading Dive Into Python now and later when I get better at Python I'll try out stuff like Python Challenge and Project Euler.

Offline

#9 2010-06-01 12:11:52

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Best way to learn Python?

My suggestions:
Read http://tinyurl.com/thinkcspy2e , read lots of code, write even more code. And if you can, get someone to review your code.

Finding some existing project that intersts you and hack on it can also be beneficial.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2010-06-01 19:19:50

simlan
Member
From: Germany
Registered: 2010-05-30
Posts: 20

Re: Best way to learn Python?

loafer wrote:

I'm not a python person but this looks interesting:

http://www.pythonchallenge.com/

Damm why did u post this link u busted my productivity. Should stop programming......Dammn big_smile

I learned Python with http://www.swaroopch.com/notes/Python which is really great wink

Offline

#11 2010-06-01 20:59:52

3])
Member
From: Netherlands
Registered: 2009-10-12
Posts: 215

Re: Best way to learn Python?

I recommend looking at "Show-me-do" videos.
Sometimes seeing a person type code in, and then seeing them run it while hearing a voice that explains it all is interesting!

http://showmedo.com/videotutorials/python

Last edited by 3]) (2010-06-01 21:00:17)


“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”-- C.A.R. Hoare

Offline

#12 2010-06-01 21:46:58

simlan
Member
From: Germany
Registered: 2010-05-30
Posts: 20

Re: Best way to learn Python?

I agree with 3])

Another cool help is IPython. Ipython is a advanced shell for Python that has great features to explore objects interactivley.

Example:

somestring.[----TAB--]

results in a list of attributes and methods that belong to the stringobject

I m really exited about this tool....


Good Night everyone

Offline

#13 2010-06-02 09:56:31

lman
Member
From: CZ
Registered: 2007-12-18
Posts: 255

Re: Best way to learn Python?

If you have some programming experience, fly through a book like Dive in to python. Then find a project you are interested in, try hacking, understanding what's done in there.

I've never really learned anything useful from books other than syntax. Reading code is much more faster and interesting for me. Try to find some motivation, and remember python is just another tool, which helps you do cool stuff. To become a programmer you need to read others code (80%) and write some of yours (20%). Reading through several books won't help smile

Last edited by lman (2010-06-02 09:56:40)

Offline

#14 2010-06-02 13:51:07

bowlesling
Member
Registered: 2010-03-25
Posts: 9

Re: Best way to learn Python?

You should also check out the Natural Language Toolkit: http://www.nltk.org/.
Even if you are not very interested in artificial ingtelligence, natural language processing, or computational lingusitics, it is a great introduction to Python in general.

It is very task-oriented. Meaning, instead of a lot of discussion of OO principles and design features it foucses on code that will allow you quickly implement various tasks... and extend that code to your own needs (within general language processing goals). It is worth the time and the O'Reilly publication that accomponies the toolkit is available for free (html): http://www.nltk.org/book

Offline

#15 2010-06-02 15:08:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Best way to learn Python?

Not direclty related to python, but watching the stanfort 106/107 courses can make you look at things a bit different, and give you a better understanding on what's really going on behind the syntax.

(They are available on youtube)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#16 2010-06-05 02:43:20

pillz
Member
Registered: 2009-08-20
Posts: 58

Re: Best way to learn Python?

Byte of Python and Think Python are both good books I've tried.

Offline

#17 2010-06-05 13:31:43

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: Best way to learn Python?

simlan wrote:

Another cool help is IPython. Ipython is a advanced shell for Python that has great features to explore objects interactivley.

Example:

somestring.[----TAB--]

results in a list of attributes and methods that belong to the stringobject

Add the following to your PYTHONSTARTUP file to get readline tab completion in a regular python shell

import rlcompleter, readline
readline.parse_and_bind("tab: complete")
del rlcompleter, readline

FYI you can get the same information with dir() and vars(), but it isnt as nice as using tab.

You can also get a persistent command history in subsequent python shells with the following

import os, atexit, readline
historyPath = os.path.expanduser("~/.python_history")

if os.path.exists(historyPath):
    readline.read_history_file(historyPath)

def save_history(historyPath=historyPath):
    import readline
    readline.write_history_file(historyPath)
atexit.register(save_history)

del os, atexit, readline
del save_history, historyPath

Offline

#18 2010-06-09 13:41:03

Paaskehare
Member
From: Denmark
Registered: 2008-11-09
Posts: 59
Website

Re: Best way to learn Python?

simlan wrote:
loafer wrote:

I'm not a python person but this looks interesting:

http://www.pythonchallenge.com/

Damm why did u post this link u busted my productivity. Should stop programming......Dammn big_smile

I learned Python with http://www.swaroopch.com/notes/Python which is really great wink

Agreed, I learned by reading "A byte of python" too, 30 mins, and I was already developing my first python program smile


im.ole

Offline

#19 2010-06-09 18:30:15

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Best way to learn Python?

All you really need is the documentation and some projects. That's really all you need to learn any programming language, unless it's your first one.

Offline

#20 2010-06-10 01:53:46

BlackHat
Member
Registered: 2010-06-10
Posts: 3

Re: Best way to learn Python?

DaniWeb IT has a bunch of helpful Python info along with examples, etc., etc.

Offline

#21 2010-06-22 15:26:30

richardmurri
Member
Registered: 2008-10-29
Posts: 39

Re: Best way to learn Python?

Buy "Python in a Nutshell" from Oreilly.  This is how I got started, and I loved how fast paced and to the point it was.  Gives a brief overview of python and then you jump in.  Python is easy enough that you can learn it straight from the reference manual.

Offline

Board footer

Powered by FluxBB