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.

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?
–
delnanJan 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.
–
JoshJan 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.
–
OrblingJan 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..
–
JoshJan 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.
–
NazariyJan 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.

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
–
JoshJan 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.
–
DarelJan 30 '11 at 3:36

@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 InternetJan 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.

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.
–
JoshJan 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 PonceJan 30 '11 at 3:34

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.

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.

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.

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.