I'm a Python beginner. I started programming with Python 1.5 months back.

I downloaded the Python docs and read some parts of the tutorial. I have been programming on codechef.com and solving problems of projecteuler. I am thinking of reading Introduction to algorithms and following this course on MIT opencourse ware as I haven't improved much in programming and I am wasting a lot of time thinking just what should I do when faced with any programming problem.

But I think that I still don't know the correct way to learn the language itself. Should I start with the library reference or continue with the Python tutorial? Is learning algorithms useful for languages such as C and not so much for Python as it has "batteries included"?

Are there some other resources for familiarization with the language and in general for learning to solve programming problems? Or do I need to just devote some more time?

closed as off-topic by Ixrec, durron597, Ampt, gnat, user22815 May 22 '15 at 11:55

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions seeking career or education advice are off topic here. They are only meaningful to the asker and do not generate lasting value for the broader community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Ampt, gnat, Community
  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Ixrec, durron597
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Knowing algorithms is useful for all languages. – Dukeling Jul 2 '13 at 11:12
  • 1
    @jmolinaso If you want more links then you can take a look at my blog page. I have placed many links in here. It might be helpful. – Aseem Bansal Jul 2 '13 at 13:37
  • thanks @AseemBansal I already bookmarked, you have quite some links there already. – user50236 Jul 3 '13 at 9:03

First of all, learning algorithms is orthogonal to learning any particular programming language, and spending time on algorithms is never wasted - in short, better knowledge of all sorts of algorithms makes you a better programmer overall, period.

Apart from that, you seem to be struggling with two independent problems: learning Python, and learning programming. How you approach learning both is highly dependent on where you stand regarding either, as well as what does and doesn't work for you.

That said, I've found the following approach works well when learning a new technology:

  1. Do a bit of preliminary reading: the wikipedia page, the project homepage, the official documentation; get an idea what it is about and how the community ticks.
  2. Install the toolchain, find a good introductory tutorial that matches your style, and play around with it. Make a few super-tiny programs, something that is sort of kind of useful, but most importantly, something you can finish in about an hour or so. Also make sure you have a complete authoritative reference guide at hand.
  3. Once you get the hang of the language basics, you should have a rough idea of what the language is good at and what not. Pick a project that the language is very suitable for, and start working on it. Get in touch with the community: they'll provide you with invaluable insights and tips.
  4. Throw away your first project and start from scratch. Really. The first project you build in any language is usually crap; that's fine, you did it for the learning experience, and you'll get half of it wrong. This is why you do it again, but this time, you do it better and more in line with the language's accepted conventions, standards and idiosyncrasies.
  5. Practice, practice, practice. Keep in touch with the community. Experiment. Read other people's code. Have others read your code. Keep an eye on new developments. And most of all, have fun.

Just like with natural languages, my experience is that nothing beats actual hands-on real-world exposure. You will never learn it if you don't use it a lot.

  • By community you mean specifically the Python community or asking around on stackoverflow and the related websites can work the same? – Aseem Bansal Jul 2 '13 at 16:11
  • 1
    You definitely want to participate in the Python community, or that of whatever tech you're learning. SO is a great resource, but it's not immersive enough to give you a good feel of the community's conventions and habits, and you'll have a harder time writing idiomatic code. – tdammers Jul 2 '13 at 21:55

I started Python a couple of years ago coming from a C background (C/C++/C#). I had the exact same thoughts you do. Although I am no expert I can tell you what helped me arrive where I currently am - feeling quite comfortable with the language while still getting real fun out of it using it for day to day work and feeling like I am learning tons of stuff every day. Here's what I did:

  • Read good books on programming fundamentals. There's a lot of them. The one's I particulary remember enjoying while learning Python were Think Python for being a great introductory book, Dive Into Python for pragmatic engineering-aware aproach and the real life examples like Web Services.
  • Use the Python documentation as a reference for the problems and questions you encounter but always investigate to the fullest. Don't just look something up and fix your code - follow the links and try to understand the full scope of what you are doing.
  • Read non-python books and material. It is invaluable to understand the language is the finger pointing at the moon. Looking at the finger you will not see the moon ;) I read Algorithms with a Python mindset. I also recommend what I am currently reading - Think like a programmer. It's examples use C++ but if you choose Python for exercising you can't go wrong. It is kind of basic but very valuable.
  • Read and try to understand the source code of the packages and modules you use. This is the thing I love Python for and think it's THE language designed for learning. All the internals are there for you.
  • MOST IMPORTANT - try a real life problem. A small webapp for a friend or customer, maybe participate in an open source project. Anything that fulfills a real necessity and you feel that you not only WANT TO but also NEED TO do it.

Keep at it and have fun. That's why I got dedicated to learning Python. It does the job and is fun and educational all the way.

  • 1
    Shouldn't Most Important be up there at number one so people don't miss it? :P Agreed though, the best way to learn a programming language is to pick a thing you want to do, and try to do it. You'll be forced to learn things you otherwise wouldn't have thought you needed as you run into problems that need solving. – KChaloux Jul 2 '13 at 12:23
  • @KChaloux Yes you're probably right. The ordered list is misleading if I put the MOST IMPORTANT last. My rhetorical device came from the notion that learning new things is a process in which you get to the crucial parts after you've spent some time exploring :) And want to is equally important to need to. – jhnwsk Jul 3 '13 at 6:53

The best solution, IMO, is to pick a project and implement it in python. It doesn't matter what the project is, though it should be interesting to you. As you struggle to overcome obstacles, you'll learn the parts of python that you need to learn.

Eventually you'll complete a decent sized project. Next, start asking yourself "how can I do that, but with threads?", or "how can I do that, but with multiprocessing?" or "how can I add a GUI to it?" or "how can I save my results in a database".

Focus on a problem that you understand well, and learn as you go. Build a solid foundation, then build upon that foundation.


I am in a very similar position to you except with C#. I started a job a few weeks ago and I knew I'd be using it so I started reading a lot and doing tutorial, sample projects, etc. Then I was given my first "real" task. I had been struggling but when you have something you have to do or you have a goal that would help outside of just learning it makes it easier.

See if there is a simple thing that you waste a lot of time doing or something you think is a problem that could be solved on your computer; why not see if you could write a little script to do it? You'll learn by doing and I guarantee you'll stumble across some key concepts while doing it and become much more familiar but in a more productive context.

Good luck.

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