Sharadraj Caliamourthy wrote:1) Why we go for python when all the works done by python can also be done by other programming languages as well ?...
Like any programming language, Python is a good fit for some requirements and users, not for others. For example, right now I'm working in a team that is looking at Big Data technologies and tools for data science.
As a developer, my focus is on scalable tools/languages that will meet our needs, such as
Scala and
Apache Spark, which are starting to look like a pretty powerful foundation for large-scale data-centric applications. Meanwhile, my data scientist colleagues are looking mainly at tools for data analysis and visualisation, and Python is proving really useful here. They are not experienced programmers, but Python is easy for them to get started with, and provides excellent tools for scientific computing,
data analysis, charts, interactive coding via
IPython Notebook etc. They can achieve their goals far more easily with Python than with Java (or Scala) for example. In these days of multi-tier distributed computing, there is no need to insist on "one language to rule them all", so you can choose the right tool to meet your needs.
Python is also proving really useful to our team as an ad hoc coding tool - we can write a quick script to solve a problem far more quickly than in Java, and we can share these tools around the team more easily. Because our work-flow involves a lot of ad hoc data cleansing, repeating and refining those processes as we learn more about the data etc, we need to be able to keep those iterations as short as possible, and Python helps us to do this.
As a mature and widely used language, Python also has tons of powerful libraries available for pretty much any application requirement. We have built some prototype applications really quickly with Python, that I have been able to hand over to the data scientists to adapt and play with as they see fit. If we'd used Java, it would have taken 4 times as long to implement these applications, and I would probably have had to maintain them myself. Python empowers my data scientist colleagues to solve their own problems instead of having to ask a developer to do it for them.
One of the really interesting trends in our field right now is that Python is becoming even more useful to my data scientist colleagues, as we start to explore Apache Spark, because Spark offers APIs in Python and Scala (as well as Java). So I can explore coding Spark applications in Scala, while they can look at using Spark's Python API and apply the same underlying tools/techniques in a more user-friendly language e.g. via IPython Notebook.
Another area where Python is helpful is looking at NoSQL databases. For example, the free online course
M101P MongoDB for Python Developers teaches you how to write simple web apps using Python and MongoDB. Python works well with MongoDB (JSON maps really easily to Python dictionaries) and there is far less boilerplate than in Java, so you can experiment and explore more easily. Yesterday I spent a couple of hours playing with
Neo4J, which I haven't used before, and almost immediately I found
a Python library that allowed me to write some simple data creation scripts to get started with. You can of course do all this with e.g. Java, but maybe you wouldn't always have time to do so. Python is becoming a kind of lingua franca which allows you to implement almost anything really quickly and easily, even if you eventually decide you need to use a different language/platform for a production application. Python is just a great tool to have in your toolbox.
Of course, Python has its disadvantages and you need to decide for yourself if it will meet your needs, but it is an excellent tool for our purposes, so I'm glad that we have been able to break free of our organisation's in-house regime of "Java for everything" and discover languages like Python and Scala that make programming fun again!
Finally, I would always encourage any serious programmer to try a new language from time to time: it's fun and you will always learn something interesting and valuable along the way.