Currently set to Index
Currently set to Follow
Skip main navigation

Python vs other languages

Why are some programming languages preferred over others? The best explanation for this is that every language excels in a certain area but Python serves a lot of purposes for developers and businesses.
Why are some programming languages preferred over others? The best explanation for this is that every language excels in a certain area but Python serves a lot of purposes for developers and businesses.
Take a look at these code snippets from C, Java, and Python:

Written in C

#include <stdio.h>
int main(int argc, char ** argv)
{
 printf("Hello, Universe!\n");
}

Written in Java

public class Hello
{
 public static void main(String argv[])
 {
 System.out.println("Hello, Universe!");
 }
}
 

Written in Python

print ("Hello, Universe!")
These code snippets all have the same purpose: they display some text on screen. Even without knowing the languages, can you see how Python’s syntax is simple and concise compared to C and Java?

Is Python the best programming language?

Tracking the popularity of programming languages can provide valuable insight into community preferences, but they won’t tell you what the ‘best’ language to learn is – this will depend on your own career choices and professional development path.
If, for example, you want to make a AAA video game, you may choose to master C# and C++, as they are considered best suited for such applications. On the other hand, if you want to make something like a face recognition program or the backend of a website, Python is definitely the way to go. Many people associate Python with industries like web development, machine learning, artificial intelligence, and data analytics.
Ultimately, a good language to learn is the one that helps you on your career path, adds value to the working world, or the one you’re just curious about. The best approach, the way of the high-performer programmer, is to seek to understand the underlying logic behind computer languages as you master them.
‘Once a programmer realizes that programming principles transcend the syntax of any specific language, the doors swing open to knowledge that truly makes a difference in quality and productivity.’ – Steve McConnell, Code Complete: A Practical Handbook of Software Construction [1]

Advantages of Python

With this principle in mind, Python is an excellent place to start. The language is concise, flexible, and similar enough to natural language to make it accessible for beginners. Even if you eventually transition to working with a different language, Python gives you a thorough grounding in basic programming concepts that apply to most languages. These concepts include conditional programming, loops, classes, functions, and data structures.

Additional reading

Read: these case studies are good examples of how companies use C, Java, and Python:
 

References

  1. McConnell S. Code Complete: A Practical Handbook of Software Construction, Second Edition [Book]. 2nd edition. Redmond, Wash: Microsoft Press; 2004 Jul 7. 960 p.
  2. Brin S, Page L. The Anatomy of a Search Engine. Computer Networks and ISDN Systems [Internet]. 1998.30. Available from: http://infolab.stanford.edu/~backrub/google.html
  3. O’Dell J. Why Walmart is using Node.js [Internet]. VentureBeat; 2012 Jan 24. Available from: https://venturebeat.com/2012/01/24/why-walmart-is-using-node-js/
  4. Gienow M. Instagram Makes a Smooth Move to Python 3 [Internet]. The New Stack; 2017 Jun 14. Available from: https://thenewstack.io/instagram-makes-smooth-move-python-3/
This article is from the free online

Introduction to Programming with Python

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education