r/learnpython • u/PricePadraic • Jun 28 '20
Can anyone explain why we use Python
I keep reading people say things like ‘because Python is built on C’ and ‘Python is much slower than C++ or Go’, ‘Thats why those languages are used to make most popular games’. I also see people refer to Python as a ‘machine’ language, etc etc. So... why use python then if you can do things faster with another language? And why is Python so popular if this is the case? Seems like python is easier to understand for me at least and much easier to read, but is there some other benefit I’m not understanding? Sorry if this had been asked before, I can’t find any direct comparison information between Python and other languages.
EDIT: Thanks everyone! I feel a much better understanding of why python is fast in a different way from other languages, saving programming time rather than computing time. Definitely got the answers I was looking for.
Another edit: Great insights all around. Thanks to everyone taking the time to answer! Looks like I need to do some more research on Cython as I see a few people mentioning it for when speed is required.
78
u/[deleted] Jun 28 '20
YouTube was bought by Google at the expense of its own development efforts on Google Video.
The YouTube team was smaller than the Google Video team but was turning out features faster.
Guess which languages the respective teams used.
Python remains a critical language at Google. Sure, they use other languages for performance/resource critical tasks, and even created some of their own (such as Go) but Python remains key.
The vast majority of startups providing cloud based services use Python at least for prototyping and often for production.
Are you aware that most of Instagram is Python based, using the Django web framework?
Python is proven at truly massive scale. It is far from perfect and not always the best choice but it is very flexible hence its popularity in so many fields.
Even on fields where high compute performance is required, Python is often used for orchestration or glue. For the pipeline in the generation of movie special effects, for example.