Python is a cross platform, general purpose, high level, dynamic and interpreted programming language. As per google trend 2016, Python is the second most popular Programming(scripting) Language just next to Java. Python has been ranked as “Programming language of the year twice, in the year 2007 and in 2010”. Since the year 2003, Python has always remained in the list of Top Ten most popular programming languages. It was designed by Guido van Rossum 25 years ago on February 20, 1991. Python was the successor of programming language ABC and was able to handle exceptions.
In December 1989, I was looking for a “hobby” programming project that would keep me occupied during the week around Christmas. My office … would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python’s Flying Circus).
— Van Rossum, Father of Python
Features of Python
- Cross platform: It Can be implemented on multiple computing platform. Python can be used on Windows, OS X as well as Linux.
- General purpose: It can be used to write a wide variety of applications and hence general purpose.
- High level: It is closer to human language (hence readable) and further from machine language.
- Dynamic: Able to execute many programming behavior at runtime and not compile-time as static programming do.
- Interpreted: Execute Instructions without the need of Compiling it into machine language code.
- Readability: Clean Syntax, indentation and English keywords in program makes it readable for users.
- Object-oriented: A methodology which makes it possible to model the system as a set of object and can be controlled in modular manner.
- Standard library: Tones of ready to use library so that you don’t have to reinvent the wheel every time, thus saving your time and money.
- White space indentation: Use white space for block indentation and not curly braces (as is the case with other programming languages). This is commonly called as an off-side rule.
Other than the features discussed above, python also is Capable of exception handling, garbage collector, unicode support, dynamic name resolution, designed to be highly extensible, etc.
Philosophy of Python
Below are the six philosophy of Python Programming Language
- Beautiful is better than Ugly
- Simple is better than complex
- complex is better than complicated
- Readability counts
- Explicit is better than implicit
- Fun to use
Python vs Perl
We are not here to flame if Perl is better than Python or not. As a matter of fact Python syntax is cleaner. Also, there is a difference in the approach of Python and Perl. Python approach is “There should be one and preferebly only one obvious way to do it.” whereas perl approach is “There is more than one way to do it”.
A Python program tends to execute faster marginally as compared to a program written in perl (though some may disagree). Use of english keywords in place of punctuation and uncluttered visual layout makes python highly readble language. Python is better known for JVM interoperability, Learning Curve and User Community. Python is good for wriitng reusable codes.
Implementation and Influences
Python founds its implementation to a lots of projects like CPython, ActivePythin, Jythin, PyPy, CLPython, Pujs, IronPythin, etc.
Python is being used by NASA, reddit, Yahoo Groups, Youtube, Quora, etc. Python is also used by lots of embedded technologies as scripting Language. Also Python influenced a lots of programming languages like Swift, CoffeeScript, Groovy, Go, Cobra, etc.
We were sure we didn’t want to use PHP. Facebook is stuck on that for legacy reasons, not because it’s the best choice right now. Our main takeaway from that experience is that programming language choice is very important and is extremely costly to change.
Python was a language that Charlie and I both knew reasonably well (though I know it a lot better now than I did when we started). We also briefly considered C#, Java, and Scala. The biggest issues with Python are speed and the lack of type checking. We decided that Python was fast enough for most of what we need to do (since we push our performance-critical code to backend servers written in C++ whenever possible). As far as type checking, we ended up writing very thorough unit tests which are worth writing anyway, and achieve most of the same goals. We also had a lot of confidence that Python would continue to evolve in a direction that would be good for the life of our codebase, having watched it evolve over the last 5 years.
So far, we’ve been pretty happy with the choice. There’s a small selection bias, but all of the early employees who’d been working with other languages in the past were happy to transition to Python, especially those coming from PHP.
— Adam D’Angelo, Quora Founder
Should I learn Python?
Seeing the varied usages and implementation of python, it is natural to think if Python is a good programming Language to learn? If this question strikes your mind, then you should read this section.
If you’ve never programmed before, I’d still recommend you to learn Python. Python is a great language which has a simple and clean syntax. It is very friendly for novice users and hence sometimes is refereed as executable pseudo codes. Tons of modules and a great community will ease your task. What you learn in python can be used for everyday task. Writing codes in python is like writing your streams of thought which makes programming fun. Python can be treated as swiss knife, sharp and convenient.
If you are an experienced programmer still Python makes a good match. Learning Python could be very quick for you and you can master it syntactically in very small time. You can use your skills in Python for data science or for making small scripts to automate tasks and save yourself from repetitive task.
So no matter if you are novice or experienced user, I’d always recommend you to learn python. It is also good from a career perspective.
Where to start Learning Python?
We are pleased to announce a series of post on python for our readers and fan. If you want to learn python from basics follow the post and don’t skip any section, even if you think you know it. Also, it is important to follow the post as it is.
Rules for standard Learning of Python
- Setup Python 2.0
Python should be installed on most of the standard Linux distributions of today. You could check the version of python installed simply by typing ‘python’ at your Linux Console/Terminal.
Python 2.7.12 (default, Jun 29 2016, 08:18:26)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Remember, I said Python 2 and not Python 3.
For many distributions it is common to have Python 2 and Python 3, side-by-side. But we are going to use Python 2.
Python 3.5.2 (default, Jul 5 2016, 11:33:36)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
Why Python 2 and not Python 3 ?
It is obvious if you think why I want you to install and use Python 2 and Python 3 is because most of the application/implementation of today relates itself to Python 2 and not Python 3. Also, if you learn python 2, learning python 3 won’t be any big deal but the case is not same when you learn python 3 before python 2. So no matter what other says, remain stick to Python 2. If Python is not installed for your distribution, you may apt/yum the required packages.
- You shouldn’t use an IDE
Well, you may ask me why not IDE? after all IDE is there to make the task easy. Well that’s true. For experience programmer its okay to use IDE but not for the novice, else you will not understand/learn several things. So for the sake of uniformity, we will use the Atom test editor. You may again install the required packages using your package manager.
- Never…Never…Never Copy and Paste my codes
You should learn my codes, but should never copy and paste to run it. Always type it yourself. This way you will prepare and train yourself to cope when I am not around.
All set and done! From next post we will start python exercise. That’s all for now. If you loved this post, give your feedback in the comments and favor us by sharing the post. Stay tuned. Enjoy!