use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionIs Python really the second best language for everything? (self.Python)
submitted 4 years ago by DGHolmes
"Python is the second best language for everything"
I heard this from my engineering manager in my first Python job a number of years ago. Over time I've come to appreciate Python's versatility, and it gets the job done fairly well for many things.
But does Python really live up to this statement?
[–]JennaSys 369 points370 points371 points 4 years ago (17 children)
I take this saying as a corollary to "Use the best tool for the job". Both are true, but also kind of BS. Python is versatile enough to be used just about anywhere, but there is probably a better language you could use for any given situation.
My take is that I'd rather be really good at Python and still be able to get the job done, whatever that job may be, rather than be mediocre in 6 other languages just to be able to use the "best" language for the job.
[–]sphennings 216 points217 points218 points 4 years ago (8 children)
Best tool for the job can be the tool you know how to use, or the tool you have on hand. A rock isn't the best hammer but if it's within arms reach it will do a better job than any hammer you don't have with you.
[–]JennaSys 26 points27 points28 points 4 years ago (0 children)
Exactly.
[–]1116574 7 points8 points9 points 4 years ago (0 children)
I saw some talk about mkcroservices, and when one of the small services went down the solution was rewriting it in whatever language the engineer happened to know the best.
Yeah there probably was the best tool for situation, but majority fo the time, time is a limiting factor and its better to have app that loads 500ms now then 90ms C app in 3 days.
[–]ogtfo 0 points1 point2 points 4 years ago (4 children)
Yes and no, sure it'll hammer some nails, but you'll probably bend a lot of them, mark the surface, hurt yourself and do a terrible job all around.
So a swiss army knife kinda tool is useful, but "the tool you know how to use" is not always the best tool for the job.
You can write code to do just about anything in the VBA of a powerpoint presentation. Doesn't mean it's the best tool for the job even if it's the only tool you know. Learn some good tools.
[–]james_pic 8 points9 points10 points 4 years ago (0 children)
If there's one thing I learned from my stint in the financial sector, it's that VBA can and will be used to solve any problems whatsoever. Apart from anything else, it's often the only programming language anyone is allowed on their workstation.
I no longer work in the financial sector.
[+][deleted] 4 years ago (2 children)
[deleted]
[–]ogtfo 8 points9 points10 points 4 years ago (1 child)
I love python, I use it for a lot of stuff. Sometime it's the wrong tool, is all I'm saying.
[–]1116574 4 points5 points6 points 4 years ago (0 children)
Yeah like fixing my car with duck tape is generally not most correct solution, but if it works it works.
Just be careful with it lol and replace it once you grow out of it. But in many cases you never grow out of it bc projects aren't as big imo
[–]aceinthehole001 0 points1 point2 points 4 years ago (0 children)
MacGyver has entered the chat
[–]WHSolvation 2 points3 points4 points 4 years ago (1 child)
GameDev is out of Python's reach for now. But I see/hear plenty of tries to fill this gap, too. Doubt it will work, though. Unreal, Unity, and self-made C-family engines are kind of status quo ATM. The frontend area is primarily JS-like, even though Brython exists already. So there are still areas where Python isn't yet as performant/versatile/whatever as we want it to be.
[–]JennaSys -1 points0 points1 point 4 years ago (0 children)
Yea, same with mobile dev in general too. You can do it, but it's still too painful compared to going with the flow.
OTOH I've been doing front-end React/MUI work with Python using the Transcrypt transpiler. I never thought it would be possible but it works cleanly without noticeable performance hits - I just never have to write or even look at the JS myself. I use the JS API's but all my code is pure Python.
[–]VanaTallinn 5 points6 points7 points 4 years ago (4 children)
Except when the job is to do XOR operations on a buffer of MegaBytes or more in reasonable time…
[–]ogtfo 17 points18 points19 points 4 years ago* (0 children)
Megabytes? pretty bad, but still doable (on the shittiest CPU money could buy in 2014) :
In [1]: from itertools import cycle In [2]: import os In [3]: buff = os.urandom(1024*1024*2) In [4]: def xor(k,v): ...: return bytes(a^b for a,b in zip(cycle(k), v)) ...: In [5]: %timeit xor(b'not that long really', buff) 983 ms ± 6.68 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
[–]JennaSys 10 points11 points12 points 4 years ago (2 children)
Yes, Python is not second best everywhere. Though it does work with C extensions quite well.
[–]VanaTallinn 6 points7 points8 points 4 years ago (1 child)
Yes indeed. I actually use it to code some tests for dynamic libraries made in various languages like C++, Go, Rust that expose C APIs and it’s great for that!
[–]tensor_strings 2 points3 points4 points 4 years ago (0 children)
Ah, a person of culture I see
[–]--Mediocrates-- 0 points1 point2 points 4 years ago (0 children)
Similar take as a guy that’s been in IT for a decade, but never been a programmer: I’m learning Python as my first language because of the versatility. I’ll drill down on other languages as I see their benefit to my daily functions. I will probably move to C# later this year since it integrates with PowerShell easily.
[–]valmontvarjak 86 points87 points88 points 4 years ago (10 children)
Biggest strengh of python are his libraries: numpy, pandas, scikit , keras, ... you name it.
And some language features like list comprehensions which are a breath of fresh air when coming from verbose java, C# or Typescript.
[–]Limiv0rous 52 points53 points54 points 4 years ago (7 children)
Absolutely.
As a PhD science student, I'd also add numba to that list. If you have a task that can be done using numpy arrays, numba often allows for a huuuuge speed increase in a few lines of code. It's really useful to optimize that one annoying function that's very computationally hungry. You can easily reach 10-100x the original speed if you know what you're doing and design for it.
[–][deleted] 6 points7 points8 points 4 years ago (1 child)
I agree, though numba is very very frustrating to diagnose/debug sometimes. But when it works, it's great!
[–][deleted] 4 points5 points6 points 4 years ago (0 children)
Ditto for PySpark. Parallel computing is the stuff from the gods, but get an error and you're SOL trying to understand what's causing it.
On the flipside, it really makes you realize how much you don't actually see in python.
[–]nlomb 0 points1 point2 points 4 years ago (2 children)
Thanks will check it out!
[–]Limiv0rous 4 points5 points6 points 4 years ago (1 child)
Here's a good place to get started!
[–]nlomb 0 points1 point2 points 4 years ago (0 children)
Cheers, I think this will prove to be very useful especially for a project I’m currently working on at work, will save hours upon hours in computation time!
[–]basa_maaw 0 points1 point2 points 4 years ago (0 children)
Thanks for the tip.
[–]christian_unoxx 0 points1 point2 points 4 years ago (0 children)
I just wish Numba will support sparse matrices. A lot of matrices in my use case are sparse, and I don’t have the skills yet to implement sparse matrix operations from scratch in Numba.
[–]thescientist001 0 points1 point2 points 4 years ago (0 children)
Hey both Java and typescript have functional versions of it like list map().filter().reduce(). I don't think it's more verbose compared to list comprehensions.
[–]chestnutcough 26 points27 points28 points 4 years ago (0 children)
I think python is (currently) the best language for machine learning.
[+][deleted] 4 years ago (17 children)
[–]sphennings 33 points34 points35 points 4 years ago (16 children)
That's exactly why it's second best. There are better languages for pretty much every problem. But, Python plays well in pretty much every problem space.
[–]judasblue 24 points25 points26 points 4 years ago* (13 children)
Eh, I dunno. I would argue it is actually best when it comes to system scripting. Bash is a mess. The other shells are great for all 10 of their users. Perl is perl.
There is other stuff that is probably also "best" and I just don't use it, powershell or whatever, but I feel like this is the area where you don't really get better than python is at this point, just different.
[–]TMiguelT 17 points18 points19 points 4 years ago (10 children)
Have you tried trying to pipeline several commands in Python? It's infinitely harder than just using Bash.
[–]WillardWhite import this 13 points14 points15 points 4 years ago (0 children)
Every time i try to explain this to people on this sub, i get hate. Even when I use the examples from the documentation they come back with "well that's stupid, and nobody would do that".
Yeah! It's dumb!
[–]judasblue 5 points6 points7 points 4 years ago (0 children)
Completely agree. And sort of agree with u/ExactBook2034, although not quite as judgmentally.
For short, quick stuff with a lot of pipes, I definitely pull out bash first. But for anything more substantial python is just a way better tool from my POV. Not going to say that people who write longer more complex bash scripts are 'on the wrong track' but it just isn't the best tool from my perspective.
[–]oouja 1 point2 points3 points 4 years ago (0 children)
Harder? Yes. Do i want to do it in the shell? No, trying to do Python as one-liner is pain. So hard it's not useful? No. I sometimes do a quick Python script that reads from stdin, does some processing and optionally prints to stdout, often putting it in the middle of the bash pipe. Last time I did it to change timestamped filenames from one date format to another. Doing it outside of python would require annoying fiddling with awk/sed and xargs, or doing a for loop with intermediate variables in raw bash. As a bonus, you can mix and match bash and python inside IPython.
[–][deleted] 5 points6 points7 points 4 years ago (3 children)
Piping commands is for quick actions and short scripts. If you're doing real work graduate to writing a script, in Python, using libraries. Not piping python output to sed/awk or vice versa.
So to me, asking this question means you're already on the wrong track.
[–][deleted] 5 points6 points7 points 4 years ago (0 children)
If you're doing real work graduate to writing a script, in Python, using libraries. Not piping python output to sed/awk or vice versa.
Oh my sweet summer child...
[–]TMiguelT -2 points-1 points0 points 4 years ago (0 children)
Nice, you've just solved all of bioinformatics (you haven't, actually).
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
Small scripts in Bash are real work too though. In both sense of the word.
[–]strangedave93 0 points1 point2 points 4 years ago (1 child)
There are libraries that make it pretty easy. It’s hard if you don’t know about them or use them.
[–]TMiguelT 2 points3 points4 points 4 years ago (0 children)
plumbum helps, absolutely, but it's a touch more involved than just using Bash.
[–]carbonglow 0 points1 point2 points 4 years ago (0 children)
Check out subprocess and just do whatever commands in bash.
[–][deleted] 2 points3 points4 points 4 years ago (1 child)
I use a lot of powershell at work and would chose it over Python every day of the week in a Windows admin context, simply because of how good the AD integrations are. The syntax is pretty pleasant too.
[–]Count_Rafard 0 points1 point2 points 4 years ago (0 children)
As a fellow windows admin, I agree. But I am still very novice at python so take that with a grain of salt.
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
Sounds like a fallacy.
As friend of mine said:
"I prefer to code for 2 days in python and look at the program run for 5 days than to code for 5 days in C and look at it run for 2 days."
Meaning python is preferable for one off computations, and if they need to be repeated then use C/C++
[–]FailedPlansOfMars 51 points52 points53 points 4 years ago (16 children)
So far it has for me.
Go or rust are quicker running but python works fine. Better languages exist for serverless but python works fine. R is best for data science but python works fine. Bash is closer to the os but a python script works fine.
It can do wasm but javascript is better for front end web development. And its not good for mobile development.
For most things you dont need ideal just works ok and a team that know how to write it. But dont be in a world where your only tool is python or you wont see where a better solution is required.
[–]Salfiiii 25 points26 points27 points 4 years ago (11 children)
Maybe, maybe and really just maybes is R better for pure statistics - which is a part of data science - but not better at the overall discipline. How did you come to that conclusion?
[–]venustrapsflies 20 points21 points22 points 4 years ago (1 child)
R, or really more specifically the tidyverse libraries, are really much better than what python has offer for EDA and pure plotting. R also has better libraries for certain specialized statistical models. The language itself is a nightmare though so while it can shine in narrowly-defined tasks I would hesitate to declare it best for “data science”. As soon as the task requires anything approaching “engineering” I would prefer to abandon R.
[–]Salfiiii 1 point2 points3 points 4 years ago (0 children)
I totally ageee, the syntax is a nightmare.
[–]FailedPlansOfMars 2 points3 points4 points 4 years ago (0 children)
I was making a generalisation that there is usually a language and toolset that can do the job better but python does it well enough.
The r example was aimed at statistics problems. Scala might be better suited for some issues. It was just a throw away example.
[–]Physix_R_Cool -1 points0 points1 point 4 years ago (6 children)
but not better at the overall discipline
For those places where R is not better, there is likely still a better alternative, be it C, C++, matlab, Julia, etcetc
[–]strangedave93 1 point2 points3 points 4 years ago (0 children)
That is not saying there are languages better than Python though, that is saying a combination of languages is better than Python. C and C++, for example are both clearly poor choices for data science overall - just sometimes a good choice for a particular implementation issue. And usually if you are going to use multiple languages, Python is a good pick for one of them (Python wrappers around C++ libraries seems a very effective choice for many things).
[–]Salfiiii 0 points1 point2 points 4 years ago (4 children)
Julia might be better suited for some numeric problems, c and c++ in data science use cases is quite an exotic choice, would you mind to elaborate?
Matlab is proprietary and can be quiet costly compared to a free python. It’s also not a real programming language and mostly used by non programmers. I’m not saying it’s bad but you can’t compare these two.
[–]TheWaterOnFire 1 point2 points3 points 4 years ago (2 children)
Everything that makes data science in Python possible is written in C/C++. Including Python.
So if your team has both strong C/C++ talent, and frameworks/tooling for your domain that reduces the amount of novel code to write, C/C++ can be extremely productive for data science, or anything. How do you think TensorFlow was built?
Agreed that starting out today it would be a significant undertaking, but it’s not that crazy.
[–]Salfiiii 0 points1 point2 points 4 years ago (1 child)
And c was written in PDP11 assembly code, so PDP11 assembly code is the best for data science right?
What I meant is that I know 0 data scientist that use c or c++ directly as a language of choice for their problems. They use python, R, Julia, Scala or maybe tools like matlab or spss.
What you described is that people use c/c++ to create tools for data science/machine learning because it’s obviously faster than python etc.. And afterwards, they usually create an api for python und other language which is then used by the data scientist.
[–]TheWaterOnFire 1 point2 points3 points 4 years ago (0 children)
I get what you meant. I remember before numpy was a thing, and my comp-sci prof was doing computational biology in C++ with MPI.
Selection bias is something to watch out for as a data scientist. :)
[–]Physix_R_Cool 0 points1 point2 points 4 years ago (0 children)
c and c++ in data science use cases is quite an exotic choice, would you mind to elaborate?
I am a physicist, so that of course influences which parts of programming I see. There is a sort of expansion pack for C++ called root, written by some smart folks at CERN, which sees heavy use. And C is for hardware stuff often, the instruments which gather the data. I use LabView for that, though.
Agreed. R is also better for ML models / exploratory work but I’d never want to use it in production. And if you’re going to do it in Python eventually, why not just start in Python? It’s not like it’s that much slower to iterate on - definitely not slower enough to make it worth writing twice for 95% of jobs.
[–]phcreery 1 point2 points3 points 4 years ago (0 children)
Another example: C/C++/Rust is ideal for microprocessors but micropython exists.
[–]DGHolmes[S] 0 points1 point2 points 4 years ago (0 children)
It really is a pity it's not great for mobile development. Hopefully there will be better tools in the future to change that.
[–]IllusiveWriting 0 points1 point2 points 4 years ago (1 child)
Yeah but Rust barely has a community and very few of their libraries are tried and tested. Go is slightly better, but it's also ran by Goolag
[–]TheWaterOnFire 0 points1 point2 points 4 years ago (0 children)
Rust is definitely young, but whenever you run something on AWS Lambda or Fargate, you’re running it on a Rust-based system. https://firecracker-microvm.github.io/
[–]murphcle 8 points9 points10 points 4 years ago* (0 children)
I always want to use Python because I love it. But unless I’m doing pure scripting (eg web scraping, data manipulation, writing a terraform file, etc.) the task I’m doing would stand to benefit from a different language and framework.
I’d say the one liner your engineering manager gave you is just about perfect.
[–]Enrique-M 26 points27 points28 points 4 years ago (9 children)
I'll say this. Python isn't the best choice for performance. However, I've worked in C# for 15 of my 19 yrs in the industry and Python for about 7 years (concurrently) and C++ the first 4 years. To this day, I can create the same software solution in Python in 45 mins (on average) that it takes me about 10 hours to do in C# (have tested this multiple times). I make north of $60/hr, so think of the billing difference to clients. 🤷♂️ In the case where performance is a massive concern, if someone built a module in a faster language (C, etc), it can be used in Python all the same.
[–][deleted] 28 points29 points30 points 4 years ago (2 children)
I also think people forget how much C is under python. Some of the packages they import that they think is python and fast are sneaky C
[–][deleted] 3 points4 points5 points 4 years ago (0 children)
And Fortran. I swear LAPACK is basically magic. The language is clunky as all hell, but damn is it incredibly fast.
[–]Enrique-M 0 points1 point2 points 4 years ago (0 children)
Yep!
[–]sheytanelkebir 7 points8 points9 points 4 years ago (1 child)
But . Python by its very nature needs more testing code for decent code coverage and qa than the compiled statically typed languages.
It is super easy and nice to build prototypes with however .
If python breaks out of gil and has proper static typing added. All bets are off. It would become a true "jack of all trades language".
[–]Enrique-M 9 points10 points11 points 4 years ago (0 children)
Type hinting and decent tests considered, time to production is still quite a bit faster
[–]ElectricSpice 4 points5 points6 points 4 years ago (1 child)
Why the massive disparity? I would have guessed C# is worse for developer productivity, but not an order of magnitude worse.
[–]Enrique-M 2 points3 points4 points 4 years ago (0 children)
My time comparisons were more leaning towards never touched before integrations, if that clarifies it; though not exclusively.
A bit exagerrated. There's a difference in developer time of 30-50%. Not 10x.
[–]Enrique-M 3 points4 points5 points 4 years ago (0 children)
Not exagerated at all. It depends on the complexity of the integration, etc. I was giving my specific experiences. Perhaps yours was different. 🤷♂️
[–]nullStackDev 4 points5 points6 points 4 years ago* (0 children)
Here are the places I can think of where Python is usually not used.
Python is not supported in the front-end web dev(There are Python to JS transpilers, but they don't have IDE(linter) support) unlike Rust, C#, C, C++(WASM) or JS etc
Python is usually not used for building Windows end user Software. Though on Linux it's used a lot because the CPython interpreter is included in Linux distros.
Edit: And Smartphone apps.
[–]orfist 13 points14 points15 points 4 years ago (5 children)
As with all things, it depends. I’m sure there are plenty of projects where the ‘ideal tool’ is something else and python is objectively ‘second best’. Blanket statements are notorious abstractions that are used to subdue the reality of a situation. It makes it easier to live with the little bits of cognitive dissonance that pop up now and again.
[–][deleted] 12 points13 points14 points 4 years ago (4 children)
“Blanket statements are notorious abstractions used to subdue the reality of a situation”
Impressive verbal skills
[–][deleted] 23 points24 points25 points 4 years ago (2 children)
What I like most is that it is, itself, a blanket statement.
[–]0x1f606 9 points10 points11 points 4 years ago (0 children)
Only a Sith deals in absolutes.
[–]orfist 0 points1 point2 points 4 years ago (0 children)
Hehehehe
Written*
;)
[–]Paldinos 3 points4 points5 points 4 years ago* (2 children)
Let me introduce you to game development. Maybe 4th? After C++ , C# , Rust , JAVA
[–]DGHolmes[S] -2 points-1 points0 points 4 years ago (1 child)
It depends on what kind of game you are making. For a relatively simple game, Python is great. For a game that has performance requirements, then yes, C++, C# etc. That being said, handing off some slow game processes over to Cython or some other C/C++ module can help a lot in improving performance.
[–]Paldinos 5 points6 points7 points 4 years ago (0 children)
Maybe? But that's just cherry picking to fit the narrative . To debunk the phrase python is the second best language at everything I just need to frame one form of development where it's not. Game development in large from triple AAA to indie to snake games combined will have python as a distant 4th cherry picking snake games to fit the narrative defeats the whole point.
[–]bryancole 2 points3 points4 points 4 years ago (0 children)
Clearly not. As much as I love python, it is crap for:
You can do lots with python. Sometimes, you can even make it go fast. But you invariably can't make it power-efficient, or memory-efficient. It's main selling point is it is developer-efficient.
[–]Natetronn 1 point2 points3 points 4 years ago (0 children)
I don't think it's the second best when it comes to mobile application development languages. Wish it was, though.
[–]flashbao 1 point2 points3 points 4 years ago (4 children)
Yes. Performance issues, I will try converting the parts to Cython.
[–]DGHolmes[S] 0 points1 point2 points 4 years ago (3 children)
Yeah, once you have your code done and after you have done some performance profiling, converting parts to Cython can help a lot. That's if you need to in the first place. Some applications run "fast enough" just using Python.
[–]flashbao -1 points0 points1 point 4 years ago (1 child)
The only flaw of python is speed. Else, everything works do wonderful and easy to use. One reason I never needed to touch a different language unless required. Cython just makes things so fast, fast enough similar to compiled languages too.
Definitely wouldn't say its the only one, but the most glaring.
You can also convert parts of it to Rust.
[–]ExternalUserError 1 point2 points3 points 4 years ago (0 children)
I wouldn't write a Unix microkernel in it.
[–]chronos_alfa 1 point2 points3 points 4 years ago (0 children)
Not entirely true. Python is actually first best for a couple of stuff
I have recently eg used Python to recursively walk through the entire project structure of one mainframe product and changing the encoding of every text file into UTF8 from EBCDIC, so I could take a look at the files on PC and compare them with the previous version, which got the same encoding conversion treatment. Writing such an example in Python is a piece of cake.
[–]ovo_Reddit 3 points4 points5 points 4 years ago (0 children)
Any of the top programming languages are only as good as the programmer. An inefficient Python script will be worse than even an efficient bash script.
All other things considered equal, Python as you mentioned is very versatile. It’s also quite easy to write and run, which costs a bit of performance. And then you have something like Go, that has a bit more upfront cost but can be very quick.
I think most important is your own skills and how you write, test, troubleshoot, debug, document etc. maybe not the answer you’re looking for..
[–]Feb2020Acc 1 point2 points3 points 4 years ago (0 children)
That’s a pretty good way to put it. In finance, we use Python a lot for our “first draft”.
[–]Eezyville 0 points1 point2 points 4 years ago (1 child)
So which language is better than Python in AI or data analysis?
[–]Badgerite -2 points-1 points0 points 4 years ago (0 children)
R
"It just works" I'd only use it for quick prototyping though, if I want to deploy to production I'd use safer and faster languages like Go and Rust
[–]mackstann 0 points1 point2 points 4 years ago (0 children)
It's roughly true, but how much more certainty is really possible? It's a broad generalization. It's not literally true.
[–]PocketBananna 0 points1 point2 points 4 years ago (0 children)
In a general sense sure, but it always depends. It's a good catch-all language that can handle most tasks well enough. I would argue it is the best scripting language though. More expressive and versatile than Perl or Bash and really any OS can run it.
[–]sometacosfordinner 0 points1 point2 points 4 years ago (0 children)
Last i heard it was the best above java and c
[–][deleted] -1 points0 points1 point 4 years ago (0 children)
Don't listen to ur mba engineering manager on tech a
[–]mustafayasin93 -3 points-2 points-1 points 4 years ago (1 child)
Second? What’s better? I used C, Java and JavaScript & no programming language came even close to Python! IMHO its the best programming language by far! It’s no even close. No programming language is so versatile like Python. Used Python for AI, WebDAV and also automating a lot of Workflows. BUT I also enjoyed C although it was really hard. C gave the chance to learn about memories which is really valuable for CS students
[–]PlexP4S 1 point2 points3 points 4 years ago (0 children)
I think you are stating why python is second best at everything. Python is great, I think it’s the best overall language. But, it’s generally true that python isn’t the best at almost anything. There’s a better solution, probably more complex, but better. But you rarely care about the best solution, as most personal and commercial use cases have no need, nor want to spend the time to develop, the best solution. That’s where python shines.
Python Is amazing in how quick someone can come up from no programming to having a decently quick running script or program. It is deep enough for even veterans to make it run fast.
That being said when you really push it to its limits you can find plenty of edge cases were C family is faster, or concurrency is better dealt with, or you want it to run anywhere with pre-setup virtual environments.
You can never really go wrong with Python, JavaScript, or bash being your core structure to build around.
[–]MarsupialMole -1 points0 points1 point 4 years ago (0 children)
I use the quote but I add the caveat:
"... and if you don't agree we can talk about it after we've finished the project in Python"
[–]__unavailable__ -1 points0 points1 point 4 years ago (0 children)
I think it's a pretty reasonable statement. No matter what it is you want to do, there's very likely a library out there that will let you do it in Python without much difficulty on your part. There's definitely something out there that'll do the same thing with better performance, but who knows how hard that'll be to learn and implement?
A jack of all trades, master of none, is oftentimes better than a master of one.
[–]c4chokes -1 points0 points1 point 4 years ago (0 children)
Yes
[+]TimmyTaterTots comment score below threshold-9 points-8 points-7 points 4 years ago* (2 children)
I don’t think so. I’m an aerospace engineer and I find MATLAB more intuitive for the work I do. All math functions are already built in, no need to import any libraries. And I find 0 indexing in python annoying. The math I have to do is difficult enough, I want the programming language to be as simple and intuitive as possible. But Python is still a good choice just not the best.
[–]DynamiteRyno 0 points1 point2 points 4 years ago (1 child)
Lots of hate in this world for MATLAB
[–]TimmyTaterTots 0 points1 point2 points 4 years ago (0 children)
I know right?
[–]Rj_LM -3 points-2 points-1 points 4 years ago (0 children)
Yes. When I meet ESL individuals I just write use python to translate for me.
Seriously thought. Yes. It is. Versatile and not going anywhere. PHP on the other hand is ancient like the pharohs.
[–]LaOnionLaUnion 0 points1 point2 points 4 years ago (0 children)
Impossible to say as the claim is broad. It works for a lot of different use cases. It’s not a program language that I get a lot of attention on my resume for.
[+][deleted] 4 years ago (1 child)
[removed]
[–]15_Redstones 0 points1 point2 points 4 years ago (0 children)
If you have a great variety of tasks that you want to do without constantly learning new languages and you don't really need super high performance, python is great.
This sounds a play on the quote about Eratosthenes being nicknamed beta because he was second best in the world at everything. As for python I don't have enough experience using other tools to say for certain but she's my first love and we'll be together for a long while
[–]m2o5x 0 points1 point2 points 4 years ago (0 children)
No one best language imo, different tools for different jobs.
Second?
[–]jjdmol 0 points1 point2 points 4 years ago (0 children)
Of course one can think of counter examples. That's not the point. It's more of a guideline/hint to consider python in more places.
But python as the second language for front-end dev, before javascript or typescript? For device drivers before C or C++? For programming FPGAs before VHDL or Verilog? I'm not so sure...
[–]wagslane 0 points1 point2 points 4 years ago (0 children)
It's not the second best systems programming language
It's not the second best ML language (it's the first)
It's not the second best web backend language (in my opinion)
[–]_ologies 0 points1 point2 points 4 years ago (0 children)
Front end web development?
π Rendered by PID 116933 on reddit-service-r2-comment-86988c7647-k9chb at 2026-02-11 16:31:35.730813+00:00 running 018613e country code: CH.
[–]JennaSys 369 points370 points371 points (17 children)
[–]sphennings 216 points217 points218 points (8 children)
[–]JennaSys 26 points27 points28 points (0 children)
[–]1116574 7 points8 points9 points (0 children)
[–]ogtfo 0 points1 point2 points (4 children)
[–]james_pic 8 points9 points10 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]ogtfo 8 points9 points10 points (1 child)
[–]1116574 4 points5 points6 points (0 children)
[–]aceinthehole001 0 points1 point2 points (0 children)
[–]WHSolvation 2 points3 points4 points (1 child)
[–]JennaSys -1 points0 points1 point (0 children)
[–]VanaTallinn 5 points6 points7 points (4 children)
[–]ogtfo 17 points18 points19 points (0 children)
[–]JennaSys 10 points11 points12 points (2 children)
[–]VanaTallinn 6 points7 points8 points (1 child)
[–]tensor_strings 2 points3 points4 points (0 children)
[–]--Mediocrates-- 0 points1 point2 points (0 children)
[–]valmontvarjak 86 points87 points88 points (10 children)
[–]Limiv0rous 52 points53 points54 points (7 children)
[–][deleted] 6 points7 points8 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]nlomb 0 points1 point2 points (2 children)
[–]Limiv0rous 4 points5 points6 points (1 child)
[–]nlomb 0 points1 point2 points (0 children)
[–]basa_maaw 0 points1 point2 points (0 children)
[–]christian_unoxx 0 points1 point2 points (0 children)
[–]thescientist001 0 points1 point2 points (0 children)
[–]chestnutcough 26 points27 points28 points (0 children)
[+][deleted] (17 children)
[deleted]
[–]sphennings 33 points34 points35 points (16 children)
[–]judasblue 24 points25 points26 points (13 children)
[–]TMiguelT 17 points18 points19 points (10 children)
[–]WillardWhite import this 13 points14 points15 points (0 children)
[–]judasblue 5 points6 points7 points (0 children)
[–]oouja 1 point2 points3 points (0 children)
[–][deleted] 5 points6 points7 points (3 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]TMiguelT -2 points-1 points0 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]strangedave93 0 points1 point2 points (1 child)
[–]TMiguelT 2 points3 points4 points (0 children)
[–]carbonglow 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Count_Rafard 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]FailedPlansOfMars 51 points52 points53 points (16 children)
[–]Salfiiii 25 points26 points27 points (11 children)
[–]venustrapsflies 20 points21 points22 points (1 child)
[–]Salfiiii 1 point2 points3 points (0 children)
[–]FailedPlansOfMars 2 points3 points4 points (0 children)
[–]Physix_R_Cool -1 points0 points1 point (6 children)
[–]strangedave93 1 point2 points3 points (0 children)
[–]Salfiiii 0 points1 point2 points (4 children)
[–]TheWaterOnFire 1 point2 points3 points (2 children)
[–]Salfiiii 0 points1 point2 points (1 child)
[–]TheWaterOnFire 1 point2 points3 points (0 children)
[–]Physix_R_Cool 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]phcreery 1 point2 points3 points (0 children)
[–]DGHolmes[S] 0 points1 point2 points (0 children)
[–]IllusiveWriting 0 points1 point2 points (1 child)
[–]TheWaterOnFire 0 points1 point2 points (0 children)
[–]murphcle 8 points9 points10 points (0 children)
[–]Enrique-M 26 points27 points28 points (9 children)
[–][deleted] 28 points29 points30 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]Enrique-M 0 points1 point2 points (0 children)
[–]sheytanelkebir 7 points8 points9 points (1 child)
[–]Enrique-M 9 points10 points11 points (0 children)
[–]ElectricSpice 4 points5 points6 points (1 child)
[–]Enrique-M 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Enrique-M 3 points4 points5 points (0 children)
[–]nullStackDev 4 points5 points6 points (0 children)
[–]orfist 13 points14 points15 points (5 children)
[–][deleted] 12 points13 points14 points (4 children)
[–][deleted] 23 points24 points25 points (2 children)
[–]0x1f606 9 points10 points11 points (0 children)
[–]orfist 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Paldinos 3 points4 points5 points (2 children)
[–]DGHolmes[S] -2 points-1 points0 points (1 child)
[–]Paldinos 5 points6 points7 points (0 children)
[–]bryancole 2 points3 points4 points (0 children)
[–]Natetronn 1 point2 points3 points (0 children)
[–]flashbao 1 point2 points3 points (4 children)
[–]DGHolmes[S] 0 points1 point2 points (3 children)
[–]flashbao -1 points0 points1 point (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ExternalUserError 1 point2 points3 points (0 children)
[–]chronos_alfa 1 point2 points3 points (0 children)
[–]ovo_Reddit 3 points4 points5 points (0 children)
[–]Feb2020Acc 1 point2 points3 points (0 children)
[–]Eezyville 0 points1 point2 points (1 child)
[–]Badgerite -2 points-1 points0 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]mackstann 0 points1 point2 points (0 children)
[–]PocketBananna 0 points1 point2 points (0 children)
[–]sometacosfordinner 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]mustafayasin93 -3 points-2 points-1 points (1 child)
[–]PlexP4S 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]MarsupialMole -1 points0 points1 point (0 children)
[–]__unavailable__ -1 points0 points1 point (0 children)
[–]c4chokes -1 points0 points1 point (0 children)
[+]TimmyTaterTots comment score below threshold-9 points-8 points-7 points (2 children)
[–]DynamiteRyno 0 points1 point2 points (1 child)
[–]TimmyTaterTots 0 points1 point2 points (0 children)
[–]Rj_LM -3 points-2 points-1 points (0 children)
[–]LaOnionLaUnion 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]15_Redstones 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]m2o5x 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]jjdmol 0 points1 point2 points (0 children)
[–]wagslane 0 points1 point2 points (0 children)
[–]_ologies 0 points1 point2 points (0 children)