Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have decided to take the time out after work to learn Python. Python appeals to me because at work (Web and eLearning Company), I have to follow out very repetitive tasks like delete all these tags, rename all these tasks and even more advanced repetive tasks. Additionally it would be good for me to get an understanding of Python first because of its fairly easy to learn syntax.

How long would it take to learn the basics of Python?

share|improve this question

closed as not constructive by Mark Trapp Jan 16 '12 at 23:50

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6  
Do you know any programming languages/Have you programmed before? –  delnan Jan 30 '11 at 1:49
    
I have learnt how to use HTML, CSS, little bit of jQuery.. And learnt Delphi at school but I didn't persue it because I had no reason to learn at the time and because of the complicated and many syntax errors.. I pretty much gave up. Python from what I understand is a fresh start and a good reason for me to learn it. –  Josh Jan 30 '11 at 1:51
2  
On your last sentence, you say you need to learn PHP for work, but want to learn Python instead? Now, I'm all for learning what you want to learn - but it's usually advisable to learn what you need first. PHP is no harder to learn. –  Orbling Jan 30 '11 at 2:35
    
Yeah we already have a PHP web developer, But there is other work that he does not have time to do.. See this question stackoverflow.com/questions/4777766/….. This is why I want to learn Python first, I get very repetitive work like this all the time.. –  Josh Jan 30 '11 at 3:31
    
If you know how to parse XML in php, there is no need to learn Python for that. Python sounds cool today, like Ruby yesterday, however non of the languages would do the work for you, its all about concentration, patience and hard work. –  Nazariy Jan 30 '11 at 4:08

10 Answers 10

The time it will take you to learn Python naturally depends on your background, the time you put into it, and the problems you want to solve. Having interesting problems to solve is probably the most important of these; sites like Project Euler are wonderful for programming in the small, but few people can learn to program well without solving problems that require more than an afternoon of thought. If you want to learn Python in order to solve problems like automating

...very repetitive tasks like delete all these tags, rename all these tasks and even more advanced repetive tasks

Then you'll probably have occasion to learn it rather quickly.

Sometimes I'm hesitant to say that I know Python in the sense that I could read and immediately understand arbitrary source code, especially source code that relies on some of the subtler magic, but within maybe a month of casual use I felt comfortable writing things like command line utilities, simple web scrapers and scientificky programs for my research. I've seen noobs (albeit, undergraduate math major noobs who have taken the programming course required for the major) sit down with an interpreter and the docs and write scripts that talk to GIS servers and parse the results.

share|improve this answer
1  
Thanks for the encouragement. I'm a bit of noob but I think, I could learn anything if I really put my mind to it like those guys you mentioned. –  Josh Jan 30 '11 at 3:28
1  
FYI they weren't all guys, but good luck. –  wvoq Jan 30 '11 at 9:47
    
It might be worth mentioning what defines knowing a language... programmers.stackexchange.com/questions/154862/… –  Xan Jul 8 '12 at 23:14

MIT has an online introductory CS class based on Python, which should give you a good start.

If you decide to work through the class, Wingware offers a nice basic IDE called Wing IDE 101 that is nicer (IMO) than Python's IDLE. ActiveState also offers Komodo Edit, another alternative to IDLE.

As for how long it will take you to learn... the ball is in your court. :-)

share|improve this answer
    
Why would I pay for a course? There are so many free tutorials online that I haven't done yet? See.. docs.python.org/tutorial –  Josh Jan 30 '11 at 3:29
2  
I don't think he was suggesting you should enroll in the course. You have access to all the course materials, lectures, and assignments at that site. If you had any specific questions, you could always ask on SO. –  Darel Jan 30 '11 at 3:36
    
I just realized that course is free, Thanks There are so many free tutorials online which one should I choose. I have started here for non-programmers.. openbookproject.net/thinkcs/python/english2e then I may learn more here. docs.python.org/tutorial –  Josh Jan 30 '11 at 3:36
1  
What is SO?.... –  Josh Jan 30 '11 at 3:37
    
@Josh - A lot of tutorials and quick intro books are really only teaching how to use the syntax of a language, with very simple examples used. The MIT courses are the courses being taught to enrolled MIT students, and IMO, that gives the them just a wee bit of street cred. As for SO... StackOverflow, a site for asking code-related programming questions. –  Joe Internet Jan 30 '11 at 4:05

If you are familiar with programming concepts in general and scripting languages in particular, getting started with Python shouldn't take you too long. You probably would be able to do simple things in matter of hours, and almost anything (though probably not in a very elegant way) in matter of weeks.

Now, getting real good in Python, as with many other things, could take a long time. And lots of practice, learning from example of others, reading, etc. You may start from here: http://stackoverflow.com/questions/111857/what-did-you-use-to-teach-yourself-python

share|improve this answer

24 hours: Sams Teach Yourself Python in 24 Hours. Its like the piano, there are degrees of learning it. Recommended reading: Teach Yourself Programming in Ten Years.

share|improve this answer
    
Thanks for the advice I'd rather learn online from tutorials then a book that may have mistakes and outdated. My old work mate learnt Python at university it didn't take 10 years and he was doing quite advanced scripts at work that we're very useful. –  Josh Jan 30 '11 at 3:25
3  
Josh, I think you misunderstood what the article is trying to say. Rushing yourself to learn something is bound to fail. Learning a language's syntax is one thing, being proficient in that language is another thing altogether. –  Terence Ponce Jan 30 '11 at 3:34

Don't keep a rigid time table for yourself. Once you're familiar with the basic concepts of programming, take up a sample project as a exercise and attempt to develop it using Python.

This discussion thread should help you with additional information.

EDIT: The opposite danger of having no strict timelines is falling slack. Just make sure you have a sense of urgency with whatever you learn, and that you are improving each day.

share|improve this answer
    
Thanks yeah once I get a basic understanding of Python I will do this simple task I'm trying to do.. See this question (nobody could solve).. stackoverflow.com/questions/4777766/… –  Josh Jan 30 '11 at 3:27

Depends if you want to learn "syntax" (then the link @jokoon posted would be enough) or if you want to learn the "language" (including all principles, common patterns, performance problems/advantages etc.).

Btw Python is often used as a starting language for students at schools... It is easy to understand.

EDIT: I will add this link, it's very helpful. The guy explains everything clearly, even for total newcomers. http://code.google.com/edu/languages/google-python-class/

share|improve this answer

Good for you, it'll help you immensely. As to learning it without any background in programming, might I suggest A Byte of Python?

It will go through not only learning python, but fundamental concepts like, variables, functions, and control flow. Follow this up with Python Module of the Week, for an introduction to all the handy pieces of the standard library that come with python.

share|improve this answer

Learning Python is really easy, a breeze if you've learned other object oriented programming languages. It easy one the most forgiving in terms of syntax. It's recommended to be the first language people learn as it contains all the OO concepts but is easier to read and less strongly typed as C++ or to a lesser extent Java.

share|improve this answer

For me, it took 10 minutes : Tutorial - Learn Python in 10 minutes

Of course, it is intended for people who already know about programming. For example, I already knew C/C++.

share|improve this answer

If you're not currently proficient (i.e., comfortable undertaking significant projects) in another programming language, you should go for a tutorial/study program geared toward new programmers.

Personally, I don't like the "learn x in ten minutes" or "learn y in twenty-four hours" typ of books, because people learn at their own pace, so I prefer resources geared toward self-pacing.

The Head First series from O'Reilly are excellent books that use principles from learning theory and cognitive science to enhance retention. I've used some of their books, and I've heard good things about Head-First Python.

In addition, one of the most popular tutorials out there is Learn Python The Hard Way, by Zed Shaw. It's available as print, eBook, video classes, and (for free!) an online HTML version. It's called 'The Hard Way' because he forces you to learn the basics in a practical manner rather than just throwing exercises at you that don't really help you truly understand how to create software in the language (which is my criticism of some of the 'in 24 hours' books).

In addition, keep with it, and when you get stuck, ask for help. This site (for general questions), and Stack Overflow are invaluable. Once you have working code you'd like to improve, you can ask for help at Code Review. Start with solid training (the books above, plus a plethora of online video tutorials and screencasts), and then take advantage of the wide community of developers who are willing to help new programmers find their footing.

share|improve this answer
    
Also, Head-First Python targets Python 3, so you don't have to worry about it being out-of-date. –  Jason Lewis Jan 16 '12 at 23:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.