8

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?

Josh
  • 343

10 Answers10

7

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.

wvoq
  • 528
2

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: https://stackoverflow.com/questions/111857/what-did-you-use-to-teach-yourself-python

StasM
  • 3,367
1

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.

1

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.

1

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. :-)

0

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/

0

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.

0

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.

0xOffset
  • 169
0

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.

Jason Lewis
  • 2,113
0

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++.

jokoon
  • 2,280