Learn in-demand programming skills and become a certified Python Developer with the Treehouse Techdegree Program. Learn more and enroll today.
When I need to build a web app, I reach for the Python programming language. When I need to automate some small task on my system, I reach for Python. When I want to find the most common colors in an image, I reach for Python. When I… OK, I think you get the picture. Basically, when I need to code something and the language doesn’t matter, I use Python.
So what is Python used for?
Python is a general purpose programming language created in the late 1980s, and named after Monty Python, that’s used by thousands of people to do things from testing microchips at Intel, to powering Instagram, to building video games with the PyGame library. It’s small, very closely resembles the English language, and has hundreds of existing third-party libraries.
So what are the major reasons why I, personally, choose Python and recommend it to as many people as possible? It comes down to three reasons.
Readability
Python very closely resembles the English language, using words like ‘not’ and ‘in’ to make it to where you can very often read a program, or script, aloud to someone else and not feel like you’re speaking some arcane language. This is also helped by Python’s very strict punctuation rules which means you don’t have curly braces ({ }) all over your code.
Also, Python has a set of rules, known as PEP 8, that tell every Python developer how to format their code. This means you always know where to put new lines and, more importantly, that pretty much every other Python script you pick up, whether it was written by a novice or a seasoned professional, will look very similar and be just as easy to read. The fact that my Python code, with five or so years of experience, looks very similar to the code that Guido van Rossum (the language’s creator) writes is such an ego boost.
Libraries
Python has been around for over 20 years, so a lot of code has built up over the decades and, being an open source programming language, a lot of this has been released for others to use. Almost all of it is collected on https://pypi.python.org, pronounced “pie-pee-eye” or, more commonly called “the CheeseShop”. You can install this software on your system to be used by your own projects. For example, if you want to use Python to build scripts with commandline arguments, you’d install the “click” library and then import it into your scripts and use it. There are libraries for pretty much any use case you can come up with, from image manipulation, to scientific calculations, to server automation.
Community
Python has user groups everywhere, usually called PUGs, and does major conferences on every continent other than Antarctica. PyCon NA, the largest Python conference in North America, sells out its 2,500 tickets this year. And, reflecting Python’s commitment to diversity, it had over 30% women speakers. PyCon NA 2013 also started a trend of offering “Young Coder” workshops, where attendees taught Python to kids between 9 and 16 years of age for a day, getting them familiar with the language and, ultimately, helping them hack and mod some games on the Raspberry Pis they were given. Being part of a such a positive community does a lot to keep you motivated. Check out PyCon to find your nearest Python conference.
I’m very excited to be able to share my favorite language with the Treehouse community and hopefully the pieces of Python that I love the most will help you decide to check it out and learn Python it with me.
Read more content about Python on our blog, or watch a short video of Kenneth giving examples of the best uses of Python.
Privileged to read this informative blog on Python. Commendable efforts to put on research the data on Python tutorial. Please enlighten us with regular updates on Python course. Friends if you’re keen to learn more about Python training you can watch this amazing tutorial on the same.
Nice article. Thank you so much.
Can we develop online android app using python
One thing I just need to be clear. For web programming, Java is one of the best choices for large-scale application. But Python is best for what?
Even larger applications. Instagram runs on Django. If you’re a web developer and want to use Python, go with Django or Flask.
Hi
is there any formal education requirened to use python as a script language (e.g being a software engineer)?
or anyone with common reason can ise python to control his work-environemt softwares?
No. You don’t have to be a software engineer for learning python but yes you need to have a basic understanding for a programming language. That will help you a lot.
does python has is own server and what is it called
Hi. Which would you recommend? Should I learn R first or learn Python first?
You must learn R first if your focus is on data science. R is easy than Python.
Been wondering what language should I learn next.. Guess I foud the answer now 🙂
Python is such a fun to learn. Can it be used to write an interactive desktop and mobile app? And if, what are the tools in python that can be deployed for the purpose.
Fantastic article I am going to learn Python with the goal of teaching my daughter.
Readability,Libraries,Community….
I am sorry to say but I see it bit diffrently.
Community : In my expirience it doesnt meant good thing (or bad). Lets look at PHP and the amount of horroble code…. Thats the problem with Community – bad code will be multiplied much more as good. So cant say its a plus point for Python either.
Libraries: No language is perfect and of course at some point for something will need extention. Amount of extentions I need for Python is overwhelming… Python is good to automate some task, but first you have to automate it to get all Libaries, since it comes almost naked. So no real plus point
Readability: Let me put it like this, I use 95% of the time C# and VBA. I have to say C# is readable and in VBA i have some question marks in my head…the same question marks are when i use Python. No real scoping in my expirience is not good and some Keywords make less sense to me. So again no real plus point
first I jus wan say tnx , and what am about to ask you is can python works the same as java do?
Hi Israel,
Python is a programming language and so is Java. So the answer is yes, they can be both used to do similar things, but their syntaxes are different. Python is simply
print(“Hello world”)
While in Java, the same thing would be:
System.out.println(“Hello world”);
So they can both do the same thing, so if you learn one, you’ll be familiar with the logic behind the other, but you’ll have to learn the syntax :).
print “I love python, its just as easy as blinking my eye”
Lol…. #just smiling in Python
Since I started learning python it’s has really been fun all the way. It’s simple and easy to learn since it’s man’s language.
I am exited to learn python.
Readability and lightweight (Django) to be the most important factor for us using it in various projects. But as Bjorn once put it – Python is the “v2/v3” double barrel shotgun, only one barrel will shoot at a time, and you never end up shooting the recommended one. Also I probably should have used a line tool to draw that. 😉
http://www.thedevmasters.com/3-reasons-why-you-should-learn-python/ is also really good article I found. I just wanted to share to you guys.
Great article Robin! Thanks for sharing.
That’s share with not share to. You’re welcome.
I have want to fly with python ….It’s super……
Python is dynamically typed: it means that you don’t declare a type (e.g. ‘integer’) for a variable name, and then assign something of that type (and only that type). Instead, you have variable names, and you bind them to entities whose type stays with the entity itself. a = 5 makes the variable name a to refer to the integer 5. Later, a = “hello” makes the variable name a to refer to a string containing “hello”. Static typed languages would have you declare int a and then a = 5, but assigning a = “hello” would have been a compile time error. On one hand, this makes everything more unpredictable (you don’t know what a refers to). On the other hand, it makes very easy to achieve some results a static typed languages makes very difficult.
Python is strongly typed. It means that if a = “5” (the string whose value is ‘5’) will remain a string, and never coerced to a number if the context requires so. Every type conversion in python must be done explicitly. This is different from, for example, Perl or Javascript, where you have weak typing, and can write things like “hello” + 5 to get “hello5”.
Python is object oriented, with class-based inheritance. Everything is an object (including classes, functions, modules, etc), in the sense that they can be passed around as arguments, have methods and attributes, and so on.
Python is multipurpose: it is not specialised to a specific target of users (like R for statistics, or PHP for web programming). It is extended through modules and libraries, that hook very easily into the C programming language.
Python enforces correct indentation of the code by making the indentation part of the syntax. There are no control braces in Python. Blocks of code are identified by the level of indentation. Although a big turn off for many programmers not used to this, it is precious as it gives a very uniform style and results in code that is visually pleasant to read.
Very very informing. If we assume that all is correct :), those are really good informations for novice for python like me (mostly c#).
This is really good. Impressed to learn python.
Great video clip !!!!!! I didn’t knew that python is used for so many diverse applications. Thanx for sharing this information
Hi,
I would like to know, is it possible to built a web app using python language??
Is python HTML friendly ??
If yes, to write an app will I need to have a server ??
You can definitely write web apps using Python. Look at Flask, Django, and Pyramid, which are the three most popular Python web frameworks.
And, yes, you’ll need a server that can run Python.
Hello I m vandana. I want to learn python . Can you help me please.
Awesome 🙂 seems like a great addition to the teacher team aswell! Can’t wait.
Welp, sign me up for this.
I am excited for this!
So excited to hear about this course and to get Treehouse’s down to earth and practical take on learning Python.
Hey Kenneth!
Haven’t seen you since the forrst podcast. It’s good to see you are working with Treehouse now! Hope to bump in to you in Portland one of these days. Much Love!
Wow, looks awesome. I may have to explore this once I am done with Javascript.
Those “best use examples” are awesome, I am really excited to take this course. I have a feeling once I learn Python, I am going to want to increase my programming skills. Its like its never ending, always something to learn.
Wow, this is really eye-opening. I can’t wait to start this course! 🙂