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.
1
u/DrBobHope Jun 29 '20
As someone who's not a programmer, but who is just starting to get into it...I believe a large part of it has to do with it's approachability, and it makes sense. Despite being new, I've been able to do quite a bit because the logic is easy to follow and type. The format is simply and straightforward. I initially was going to start with Java, but the formatting looked really ugly and overly complicated. R is a nice, but I found python more general/flexible (plus R had some weird quirks I didn't like, like assigning variables with -->). Matlab/Octave are great as well but too limiting. You can do everything they can do in Python, and more.
I'm afraid I'm too novice to really comment on C or any other languages, but this is why I chose Python. I do plan on eventually learning Java (since its so widely used, might be useful), but I have yet to see any application Java can do, that Python can't (mastery of 1 vs. jack of all?).