Ask coding questions

← Back to all posts
Why is Python so popular?
h
SixBeeps (5629)

I mean, I will admit it's pretty intuitive, but if you take a look at the Share forum, nearly all of the Repls are written in Python! Python developers, why do you like Python so much?

Comments
hotnewtop
mwilki7 (1136)

no one can convince me their indentation syntax is a good idea

[deleted]

@mwilki7 indentaion syntax is great idea

Zavexeon (1166)

@mwilki7 If only I could somehow upvote this comment more than once.

mwilki7 (1136)

@maazzubair99

[deleted]

i like python bc is simple. I know that most of the syntax and scopes relies on whitespace, but that makes it easier for me to read rather than a mess of curly braces and semicolons.

plus, indentation is just good practice no matter what language you are in

SixBeeps (5629)

@maazzubair99 I mean like, look at Ruby:

It has the same indentation syntax, same symbols, etc.
Why doesn't Ruby get used?

WilliamPenrod (41)

@mwilki7 I agree 10000%. I hate the indentation syntax, tabs can come later.

[deleted]

@niorg2606 Python's just more known. If Ruby got some more publicity, it would probably blow up as well.

SixBeeps (5629)

@maazzubair99 But then we're back at the question, why was Python chosen to be the "best?"

theangryepicbanana (1710)

@niorg2606 probably because is was publicized as "easy to learn" or something like that

V3rmillionNet (53)

ruby is red, i like red, python devs like yellow and blue. Done :) @niorg2606

AdCharity (1328)

because it is too high level

MoonOwl24 (1)

It's simple yet powerful.

SixBeeps (5629)

@MoonOwl24 I mean sure, but there are so many other languages to choose from that also fit that description.

code5 (15)

Python is a very popular language. It is constantly growing. It is a great server side language. It is great with dealing with big projects, such as databases, servers etc. Python overall is a easier written language than most, and can do nearly everything, if not more, than other languages can. Don't take this wrongly though, I am not saying Python is better than any language, I am saying it is very very powerful in many many fields which makes it popular.

Want a website? - Flask or Django
Want to read a website code? - requests or BeautifulSoup or Both
Write data in json format? - json module
Write into a file and save data? - with open
Want a fast and easy loading bar? - tqdm
Want to access system commands and or system info? - os module
Want to train data? - Numpy or pytorch(note: pytorch is not available on repl)
Want to do nearly anything you brain desires and have it easily done in a matter of no more than a week? - Python!

code5 (15)

Look at it:
C#:

Python:

SixBeeps (5629)

@code5 Length of the code is only one factor in determining the quality of a language, though. I mean, here's a hello world program written in Assembly:

That's long, but it runs a lot better than any language out there.

Also, your C# code can be simplified:

It's longer than Python, but at least we don't have to import a module in order to use command line args :)

Evanlicious (19)

I went to Python because it was the one of the best languages for me, although I could have picked Ruby or something, and also because of the sheer amount of people that use it and have modules on it.

CompuGenius (1)

It was my first coding language! I love how easy the syntax it, and how simple it is to learn!

SixBeeps (5629)

@CompuGeniusCode It may be easier to learn, but there are plenty of other languages that are easy as well. I mean, look at Ruby (I posted a code example earlier)

theangryepicbanana (1710)

Probably because it's easy to learn. Sad thing is that you can't really do anything useful in it compared to other languages

Foster_Bryant (90)

@theangryepicbanana what can I use go for? I wanna learn it

theangryepicbanana (1710)

@Foster_Bryant go seems to be popular for backend so maybe go for that?

SixBeeps (5629)

@Foster_Bryant Like they said, you can write a good server backend in it. However, it was created to be a general-purpose language, so you could use it for anything.

Foster_Bryant (90)

@niorg2606 in go, how do i upload a file to a server? also thanks

SixBeeps (5629)

@Foster_Bryant By backend, we mean it is the server. But, the Golang HTTP package would be able to handle any client-server stuffs.

Foster_Bryant (90)

@niorg2606 thanks so much I might learn go just for this but how do I run a python and go file at the same time? through bash? idek bash

SixBeeps (5629)

@Foster_Bryant Are you writing a client in Python and the server in Go? What are you trying to do exactly?

CompuGenius (1)

@theangryepicbanana I don't know what you mean by "anything useful". I mean did you know that Netflix, YouTube, Google, and many other popular sites actually use or used Python?

theangryepicbanana (1710)

@CompuGeniusCode yes and did you know that java, c++, and js are all used way more because they can do more?

CompuGenius (1)

@theangryepicbanana of course they are used a lot, but it's not true that they can do more. Python is one of the most powerful languages in the world.

theangryepicbanana (1710)

@CompuGeniusCode it's powerful from the perspective of a CS student. in the real world, python is pretty much useless for anything outside of ai/ml

CompuGenius (1)

@theangryepicbanana I love how you assume I'm basing my opinions from the view of a student. I am basing my opinions from the views of major companies who actually use Python on a daily basis.