Why learn Python?

Question

Why should I learn Python? Are there any advantages to learning Python over other languages?

Answer

Python is a great language to learn, whether it’s your first time programming or not, for several reasons:

  • It reads like plain English! This is something you can especially appreciate with a side-by-side. Take a look and, without worrying about what these code bits actually do, think about which is harder to read:
// Java
public class HelloWorld {  
  public static void main(String[] args) {  
    System.out.println("Hello, World!");  
  }  
}
# Python
print “Hello, World!”
  • It’s one of the most popular programming languages with a massive community. This means help is readily available when you’re stuck!

  • It’s used in many fields and industries, like Web development, machine learning and AI, and data science, just to name a few. So once you learn the fundamentals, you can grow into the role of your choice!

Python is one of our most popular courses and is only getting more so. We covered why Python is so popular in more depth in another piece, check it out.

Do you have any insights into why people should learn Python? Share them below!

25 Likes

Well said, but I would suggest this instead:

print("Hello, 世界!")

You cannot do that in Python 2.

17 Likes

Whether you want to go for Functional programming or OOPs, Shell scripting or interested in Web Development, Desktop related app or Network related the one best choice we have is python. Because of its modularity, it becomes popular.

6 Likes

This is true!

But of course it is possible, using encoding and decoding. I was forced to mess with that evil when I was writing a Chinese Shanghai weather bot for Twitter years ago.

Link (I found it!): https://twitter.com/shanghaihourly


OP:

I feel that Python has incredibly fast development times. I enjoy the fact that I can pop open notepad and have a decent script up and running for my work in minutes not hours.

10 Likes

One of the most useful languages with innumerable amounts of documentations.

10 Likes

@robmuh you are correct BUT
print “Hello, 世界!” works in py 2

From my experience, it has been Easier to learn the concepts within python 2
Then you can easily incorporate the functional syntax towards python 3
when you begin to understand the process of programming and the language.

8 Likes

Python is really great for learning base computer programming concepts. I at least know in my experience in my coding class it was the easiest one for everyone to really jump into and learn. Coming from a newbie it really made it easier to adjust. :+1::grinning:

14 Likes

Well this analogy about why leanr python with that example its not exacly true… for example you can use php and use echo ‘A’; instead of print(‘A’) or directly println, in other commands. But well ok learning python is fun.

2 Likes

This is a bad way to compare the languages. Off course, the Python code is more short and friendly, but this language don’t give us the control and usability of more robusts languages like Java and some others.

3 Likes

well, you are right but i would phrase it a little bitter. Java is a more verbose language, but has absolutely proved its worth as an industry strong language, its strongly typed, vast ecosystem with great (deploy) tools and much more.

5 Likes

It’s verbose in annoying way, but it’s what you said. Both languages have your advantages, each one in your proposals and goals, the discuss go beyond one print() and a System.out.print() hahaha. I like more Python, by the way.

2 Likes

but type safety/strongly typed is a good advantage, certainly in larger projects. Facebook spend a massive engineering effort to make there PHP code strongly typed. Python3.6 introduced these concepts as well, although the interpreter doesn’t yet throw an error for it. (from what i read)

it goes far beyond print and System.out.print or System.out.println

6 Likes

Plus there’s always PyGame if you want to go into making games, that’s also based on Python 2, at least it was last time I used it!

5 Likes

because it is used to in many fields like data science , machine learning , app mobile , and web develop .

5 Likes

4 posts were split to a new topic: Why I Chose to Learn Python

Regardless the language you choose or are convinced to learn, what is the field of your endeavor? That should be what determines your immediate learning need. Some fields are rife with Java code, others C++. Some fields are ripe for the taking with Python, such as robotics and controls. Pick your field, then choose the language that has the right fit. If Python is the right fit, then bring it on.

Back in the day, I chose JS as the language to learn. Then it branched to PHP. All I did was solve my own problems through that whole process, and came about with some pretty cool code. It’s all gone now. Cassini has crashed into Saturn. Make whatever you write mean something in its day.

17 Likes

Hi, To be fair to py 2. I was only 5 mins into coding with Python and came across this issue. The error message is so specific and I got a solution straightaway by following the link.

3 Likes

Other languages like Java, or especially C++ may give more control over many low-level aspects of programming (‘closer to the machine’ is one way to say it) but they are not necessarily more “usable” than Python, as you write. As for being more “robust” (there is no “s” at the end) this means strong, healthy and in computer terms it often means less likely to malfunction or crash due to being stressed or pushed to the limit. And in this sense I don’t think Python is any less robust than Java, and it probably depends far more on the specifics of a given program, like how well and how professionally it is coded. Of course, no language can provide the low-level control of Assembler, which is limited only by the capabilities of the CPU and its instruction set (e.g. Intel x86, Oracle/Sun SPARC, IBM POWER8, etc.).

3 Likes

I just started to learn Python. I know PHP well and out of curiosity, I start a new programming language. We’ll see if I can get to know him well. The syntax seems simple.

6 Likes

In my opinion, Python is one of the easiest languages to use and learn when starting to program. It provides easily manageable and readable syntax, allowing you to generally focus more on trying to grasp the ideas and concepts of programming as a whole which practically entails most of all coding languages.

you’ll start to notice there are many programming languages that generally have different means of use, but the knowledge of the fundamentals are easier to comprehend while starting with python. It’s also a very formidable object oriented program language that can even attach to other languages you might use in the future to enhance the program your working on. Even such as languages written with c++.

5 Likes