in Python what and why

How long does it take to learn Python?

How long does it take to learn Python?  Quick Answer: a few hours!

Well, it probably has a lot to do with two things: first your level of motivation and second the methodology you are using to learn Python.  Let’s first talk about your personal motivation and the real reason behind learning Python.

Learning Pythonwhat is your real reason?

I have personally found that sometimes my eyes are bigger than my stomach.  You’re not going to be able to eat an elephant all by yourself, it’s simply defies the laws of physics.  So when you scope out your Python elephant make sure you chose the proper motivation.  I will provide a few examples.  For instance, if you just want to add one more certification to your wall, you’re probably not going to be as successful achieving that goal as you would building a small application that helps you solve some interesting problem.

When learning Python I have found that I learn more and I learn faster when I solve small problems that I find to be interesting.  I tried studying Python just in general terms for several years before I finally learned Python. The reason was that I lacked the proper motivation.  I was trying to eat the entire elephant instead of picking something that I could handle on my own.  I found the my interest was really in scraping data from websites and then learning to parse that data to get interesting questions answered.

My first scraping adventure was trying to scrape play by play data from the NFL.com website.  I was trying to find trends, like what percentage of the time does Peyton Manning throw to the right side?  Which corner backs in the NFL give him hardest time? Etc…  I was able to accomplish this in about one week.  By the way, I completed that project on my IPAD while sitting on my sofa in front of the T.V. The point is that I spent years trying to learn the general Python language, but I failed miserably until I picked a specific thing to do.  Side-note:  If you want to learn to scrape data we can have you successfully scraping data from the Internet in about 2 hours.   I encourage anyone that is trying to learn a programming language to pick a small project and just do it.  Of course you will need some basic skills before you have the capability to begin, even a small project, which leads me to the next topic…  The correct way to learn how to program.

The best methodology for learning Python (or any programming language).

I learned the basics of Python in about 4 hours one night at my kitchen table.  My son, who is a Computer Science student at a top 10 engineering college was studying for his Python final exam.  Long story short, I helped him work all of the problems that were on his study guide.  We finished about 50 problems in 4 hours.  Once I finished those problems, I had enough Python expertise to at-least begin a small project.

Honestly, learning Python by completing small problems helped me tremendously.  I found that when I began to write my first few lines of code there was no difference between what I had been doing while studying and what I was doing in real life.  My first real problem was to scrape data from a website.  Scraping data was not one of my study problems so the first thing I did was to google how to scrape data with Python.  I learned that getting the data from a webpage into my program was 2 lines of code.  The rest of the problem was taking the data and manipulating that data.  Pretty much the same thing I had been doing in my 50 or so practice problems.

My point to all of this is that trying to read a book and memorize facts and understand theory does not work.  What works is completing a few problems and then applying those skills to a real-life problem.  Speaking specifically of Python now… I think learning to scrape data is the best and easiest way to learn Python, after all, that was how Google first began using it.  So I highly recommend our Python curriculum – 10 minute Python Problems.  The title speaks for itself.  Complete these 80 problems and you will know the fundamentals of Python.