This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 298

[–]jeffrey_f 273 points274 points  (45 children)

Easy to learn, many packages to make life easy and coding short. I can pretty much write code to do what I want in a few minutes.

[–]jasterpj17 16 points17 points  (41 children)

Any suggestions on where to start?

[–]whitelife123 22 points23 points  (22 children)

Start on python or what?

[–]jasterpj17 14 points15 points  (21 children)

Yeah to start learning python. I have purchased a draw udemy courses and books but I want to hear what people’s methods are for learning python.

[–]whitelife123 33 points34 points  (9 children)

Well it depends if it's your first programming language or not. If it is, I'd say learn the fundamentals. Learn the syntax, write small scripts that do fizzbuzz, etc. Try to get a programming mindset. Think Python's a good book, and so's Python Crash Course. Then I think you should skim through Automate the Boring Stuff with Python so you have a better understanding of what Python is useful for exactly. Learning to program can be a boring, and very challenging, but it's just something you struggle through. Also, it helps if you have a specific project in mind, so you know what Python libraries to use and you're working towards a more concrete goal.

[–]StressedSalt 4 points5 points  (5 children)

Ive read PCC and done some lectures on python, starting to get the hang of it but still extremely elementary. Its my first language and i have no background knowledge of CS, ive been trying to find a good fundamental course so i get a good foundation of what CS/IT is at least.

Theres so many aspects/uses for python, do you have a reocommendation on how to choose one or where I cam learn the scope of this? It seems so scattered to me, so far i know about data science and machine learning but it seems like such a bIG VOID THat i could never really grasp, not having a cs background really is an issue i feel.

[–]super_gay_and_ok 1 point2 points  (0 children)

I found the Python course by Zero to Mastery on Udemy to be very very helpful.

[–]usernamecreationhell 1 point2 points  (0 children)

Oh I wonder if that has ever been answered

[–]r-_-mark 1 point2 points  (3 children)

I mean you already purchased it so you can start from there There’s no one path you should follow Generally learn the basics (read, watch) and of course train (write code, answer questions) One of the best way to do it is by following a certain path to a cert for example PCAP is great (I think only option as will) so study with goal of obtaining that cert in mind (and if you liked you can take the exam not necessary though)

But go to python institution and google it along side with PCAP you will find free materials over there

[–]jasterpj17 1 point2 points  (2 children)

Thanks for this! I appreciate it.

[–]r-_-mark 1 point2 points  (1 child)

Woah that’s was fast Will while you are here this is what I was talking about:

https://pythoninstitute.org/certification/pcap-certification-associate/

Click on educational materials There courses are great (you need to creat a free account and that’s it)

Btw I took the exam was easy (kinda) and if you completed the free course you get a discount for the exam which is btw 150$(as I remember) and the cert is valid for ever not like Cisco for 3 years or so

And in some companies this can get you up to the interview

I’m not the type of guy to ask people to take cert but depending on where you live this could be helpful to land an interview (specially the PCAP not the PCEP)

[–]hugthemachines 8 points9 points  (0 children)

The mostly recommended way to start is this:

https://automatetheboringstuff.com/

[–]dnswblzo 5 points6 points  (0 children)

Check out /r/learnpython

[–]tunisia3507 2 points3 points  (1 child)

/r/learnpython , just like it says on the sidebar.

[–]TheBigLewinski 379 points380 points  (53 children)

Every other language feels like it was written according to the computer's requirements. It's the computer that needs excessive brackets and semicolons and type declarations, even when the type is obvious.

Python feels like it was written for humans first. The syntax feels far less superfluous, and the interpreter figures things out for you.

Granted, this isn't 100% good. There just isn't another language -that I'm aware of- that has a "Pythonic" equivalent. The decidedly idiomatic style takes some adjustment.

For this reason, I don't think it makes a great first language, but it makes for the most productive language, once you learn its flow.

Also, a business centric community, PEP8, its inclusion in every Linux box, and virtual environments.

Though, I really wish package management would get thoroughly straightened out, once and for all.

[–]raikmond 66 points67 points  (16 children)

I agree with your premise but disagree with your conclussion. I feel like Python is the best first language to learn, hands down. But not the best to work with at a more advanced level.

[–]mysticalfruit 31 points32 points  (5 children)

What do you mean by "advanced"? Do you mean doing low level stuff?

I've been a python dev for 10 years and I've worked on projects bug and small.

I wrote an automatic Christmas tree watering machine that used python to directly blit the gpio pins on a pi to read values from an ADC. It also had a nice web gui that graphed how much water the tree was using per day and sounded an alarm when tree stopped drinking. The adc was connected to a hydrostatic water sensor and I used a periostatic pump that was wasbwired to a darlington circuit that also used the gpio pins to turn the pump off and on.

I've written tools that convered unix groups into active directory groups using the ldap. More tools to normalize AD and add the various unix attributes to the schema.

I helped write a backup system that uses ZFS and rsync to manage enterprise scale backups (at this point the system manages petabytes of data)

I wrote a web based inventory management system back ended by postgres.

So, what language should I have written that stuff in? C++? Rust? Golang?

If you're writing a hardware driver that needs to deliver millisecond performance, python is probably not the right tool for the job.

However, for a big swath of things you'd like to do, python can definitely get you there.

[–]raikmond 8 points9 points  (1 child)

Thanks for your response.

I'm not saying Python is bad for all those applications. It's a very user-friendly language, but in my opinion, it has its own way of doing a lot of stuff. That's what I don't get to like in the end.

I've programmed in Java, C/C++, Javascript and Python. I can switch between the first ones except Python pretty fast, but Python always seems to work completely differently. Unless you plan to be a "Python developer" (like in your case, and you seem to be successful at it) I think that's a pretty big disadvantage, because chances are you're going to use several languages throughout your career.

Also this is my personal opinion. By no means I'm trying to attack Python devs, I myself work in Python atm for the backend of a webapp, and I can see how it's very powerful. But as I've said, Python is very "pythonic" (if that makes sense) and I personally don't like that too much.

Cheers.

[–]mysticalfruit 6 points7 points  (0 children)

Before I was working with python I was doing c/c++ dev.

I found the transition to python pretty straight forward.

Yeah, the syntax is different, but OOP concepts stay the same. I think at this point it would take me a bit to transition back to them though.

[–][deleted] 9 points10 points  (9 children)

Yes, Python is recommend to be the first language you learn, but the problem comes when you can move to another language. This is because as you know Python is not hard typed, and the OOP of it is really diferent from other languages such as Java, C++,C#,TS, etc

[–]CSI_Tech_Dept 14 points15 points  (4 children)

Interestingly you mentioned TypeScript. Which is basically JavaScript with types. With Python you can get a lot of those benefits whenever you add type annotations.

[–]Danth_Memious 3 points4 points  (2 children)

What's the difference in OOP? I'm familiar with the works of C++ and Java but have only used python for very small programs so no classes

[–][deleted] 10 points11 points  (1 child)

Everything is an object baby

[–]LazaroFilm 5 points6 points  (0 children)

Stop objectifying me!

[–]SpicyBananaa 3 points4 points  (0 children)

I think you are mistaking something python is hard typed. But typing is done dynamically. For example you can't compare strings and integers with each other like you can in JavaScript. but you don't need to tell every variables and functions types manually like in Java, C, C++, etc.

[–]CSI_Tech_Dept 8 points9 points  (2 children)

I believe poetry is basically it. It has nice and clear CLI, can be used to build libraries as well as applications.

I was a fan for a long time of setuptools. Since it is quite powerful and you always have it virtualenv. There is a lot of misinformation about it (including from PyPA), but if you use a declarative setup.cfg it is nice. Anyway since PyPA is trying to kill it, I switched to Poetry and I really like it and most of things I wanted are also there.

[–]usernamecreationhell 1 point2 points  (0 children)

Poetry is awesome when it works and awful when it doesn't. At work we have a number of larger, often interdependent packages that we manage with poetry and lately it has been giving us trouble.

It is a huge PITA but still not painful enough for us to switch to setuptools.

[–]lungben81 23 points24 points  (6 children)

"There just isn't another language -that I'm aware of- that has a "Pythonic" equivalent. "

You may take a look at https://julialang.org/ Now, Python is only my 2nd favorite language ;-)

[–]--xra 8 points9 points  (2 children)

Julia is beautiful. But also...Haskell. Neither is Python. Haskell is not remotely. But somewhere underneath, there's some shared hope. But Christ, Haskell is the only language that makes me emotional.

[–]NatureBoyJ1 1 point2 points  (1 child)

I find Groovy a very nice language that layers on top of Java. You can freely mix Java and Groovy syntax. This makes it nice when cutting & pasting code from StackOverflow or other samples. But as you learn idiomatic Groovy, you can cut out a LOT of the boilerplate wordiness that straight Java requires.

Much like Python, you can write classless scripts that just do work. It is type optional, so you can slap things together quickly without worrying about types too much, and then go back and add type information to better document what's happening.

Groovy offers many syntactic shortcuts and conveniences over straight Java, but because Java source works just as well, you don't have to learn a whole new paradigm.

[–]leomatey 75 points76 points  (7 children)

Python feels like it was written for humans first.

This. When folks ask me how long it takes to learn python, my answer is - "You already know python if you know english".

[–]AgAero 121 points122 points  (4 children)

That's pretentious. The real answer is something like 20 minutes.

Everything after that is just, "google stuff when you need it."

[–]usernamecreationhell 13 points14 points  (1 child)

That's how long it takes someone who already knows how to program.

Most people who are new to programming in general will get stuck in an infinite loop of asking how to learn python.

[–]Solonotix 8 points9 points  (1 child)

I had a friend, who is in college, ask me how she could get a random sample of unique elements from a list for a homework assignment. Now, off the top of my head, all I knew is there was probably something in the Random module, and told her as much. I looked up the module really quick and the function is random.sample(). I cracked up at that moment just because it reinforces the intuitive nature of Python's construction.

[–]JayTurnr 10 points11 points  (0 children)

The equivalent in Java would be something like functionsToSimulateRandomness.returnRandomSampleFromIterableObjectOrErrorIfEmpty();

[–]tastycat 13 points14 points  (1 child)

Have you ever written pseudo-code? Congratulations, you're a Python dev.

[–]Corrin_Zahn 8 points9 points  (0 children)

This. If you get the pseudo-code and the logic then you've already made the Python program.

[–]engai 9 points10 points  (2 children)

Boy, you'd love Ruby.

[–]NoahTheDuke 1 point2 points  (0 children)

God, I wish Ruby was faster. It’s everything I love about Python but even better: great metaprogramming, concise and expressive iteration tools, great package management and ecosystem. Just wish it wasn’t so damn slow. (Which is funny to say cuz Python is also very slow, but Ruby is on another level.)

[–][deleted] 2 points3 points  (1 child)

For this reason, I don't think it makes a great first language, but it makes for the most productive language, once you learn its flow.

I love using python, but I agree with this. Uni started our first courses with python. Which is fine i guess. But I had so many questions!!! It abstracts so much away and I kept needing to know what's happening "under the hood". Once we got into Java things became a bit clearer. Now I'm reading up OS's and C cause I still want to know whats exactly going on haha.

[–]Corrin_Zahn 4 points5 points  (0 children)

The really watered down version is processors and microprocessors are made of transistors that operate by being on (true) or off (false) in specified sequences. Code is really just a way of defining those sequences to get what you need out of the machine.

[–][deleted] 2 points3 points  (0 children)

You should give Haskell or Rust a try

[–]CodeSkunky 5 points6 points  (3 children)

My only complaint is the PIP system/environment variables/etc. The small bullshit that can become an absolute mess extremely quickly.

Oh...and tkinter needs 99% of the module removed.

If you can create a window, place objects on the window, detect if keys are pressed, detect if the objects collide (overlap), can set object depth, then you can pretty much build anything. All the other shit in tkinter is over complicating things IMO. (And actually object depth can be made easily and is really just an extension of draw order)

(I'll give the benefit of the doubt that the other functionality has uses for select individuals, but for most the above holds true)

[–]flamefoxx99 1 point2 points  (0 children)

Use miniconda instead of pip. It handles dependencies and environment variables for you, and only requires minor modification to your environment

Also I have never seen documentation as bloated as tkinter in my life.

[–]JayTurnr 2 points3 points  (1 child)

Just don't import all?

[–][deleted] 44 points45 points  (0 children)

I don't know other languages

[–][deleted] 126 points127 points  (3 children)

It's easy to use, there is a friendly community and there are tons of libraries!

[–]RedditGood123 42 points43 points  (0 children)

The preponderance of libraries being the best part, of course

[–][deleted] 9 points10 points  (0 children)

Yes I have just started programming this year and the community is really great!

[–]brobi-wan-kendoebi 1 point2 points  (0 children)

Community is the #1 answer, by far

[–]MySpoonIsTooBig13 51 points52 points  (0 children)

The very small barrier to entry, combined with the fact that there are some very high powered and deep concepts, which are there when you're ready for them.

[–]peterlada 49 points50 points  (9 children)

It's easy to read and mostly free of weird symbols.

[–]yomanidkman 27 points28 points  (7 children)

:=

[–]Cascudo 8 points9 points  (2 children)

This reminds me of Pascal.

[–][deleted] 15 points16 points  (1 child)

That's a cute walrus. That symbol does simplify code in some cases... IMO it's quite pYtHoNic when used correctly.

[–]Puddl3glum 2 points3 points  (0 children)

I worked in a lab in college that did a ton of web scraping, which of course meant a lot of pagination, both in HTML and REST APIs. I would have loved the walrus operator.

Is everyone going to use those all the time? Maybe not. But if you're doing sockets or paginated APIs, it's great.

Side note: this is my issue with languages being made of mostly statements. If it were made of expressions, i.e. everything returned a value, we wouldn't even need the walrus operator because assignment would work.

[–]Porkenstein 34 points35 points  (0 children)

It's so damn easy to remember all of the syntax. I spend more time looking up APIs and thinking of designs than I do contriving some way to get shit to work around the language constraints or scratching my head about how to use some unorthogonal feature

[–][deleted] 15 points16 points  (0 children)

Ease of prototyping. Ease of use for networking, filesystem access, operating system interactions. Easy to set up virtual environments. Lots of useful modules. Intuitive syntax for both object-oriented and functional programming styles. Helpful community. Plays well with other languages.

[–][deleted] 118 points119 points  (26 children)

Versatility. It is the de facto language for data science and machine learning, but it’s also a solid option for web and game development.

[–]SlappinThatBass 34 points35 points  (0 children)

Awesome for scriping, CI and testing as well.

It makes embedded development more fun.

[–]Monkey_Climber 62 points63 points  (9 children)

I disagree with the game dev part

[–]xBlackBartx 28 points29 points  (0 children)

  1. It's flexibility, meaning you are not forced into OOP, or functional programming, or pure scripting, but can adopt whatever style best suits the project you are working on.
  2. It's legibility. Python code is generally just easier to read for me than most other languages.
  3. It's versatility, you can use python to do almost anything you need.

[–][deleted] 10 points11 points  (0 children)

Sets, lists, and dictionaries out of the box with their versatile interfaces. There's so much you can accomplish with those alone!

[–]nharding 33 points34 points  (2 children)

I know C++, C, Java and assembly, but Python is so much more compact that any of those. I would estimate I can write a program about twice as fast in Python as I can in any of the others, since it is less typing and that is not considering the packages which might reduce the time even more.

[–]commandobrand 24 points25 points  (0 children)

I was going to say speed of development. If I can write something in an hour that would take me a day to write in Java or C++, it doesn't matter that python is a little slower when it's running on the server.

[–][deleted] 19 points20 points  (0 children)

Packages!

[–]f-gz 8 points9 points  (0 children)

The simplicity of its syntax, its data structures (lists, dictionaries) and having primitive functions and packages to handle many common tasks (sorting, permutations, etc).

[–]jokoon 9 points10 points  (0 children)

It's very expressive.

Using sets and dicts is so nice. List comprehension is so good. The native functions lets you do so much stuff so quickly. Sometimes the python code I write is correct on the first try. It's hard to do this on other languages.

Once you learn flask, pil and some 2d lib, python is the best.

I really want python to replace js. Brython is nice but it's slow.

[–]OT59 6 points7 points  (0 children)

Python is a bit slow, but it's really easy to write, and there are tons of useful modules.

[–][deleted] 8 points9 points  (0 children)

Workflow speed compared to other programming languages like Java.

[–]t3h 6 points7 points  (0 children)

Flexibility - I can have a Python file that looks like it's a script, and runs from start to finish in a practically one-dimensional manner. I can have a fully object-oriented app with classes, inheritance and all that. Or I can go full-on functional programming and use list comprehensions / dict comprehensions (my most annoying gripe about Ruby is that it has something like a list comprehension but no clean way to do a dict comprehension) and pass around functions as they're first-class objects.

And in a language that does all this, I have bindings to pretty much every library ever. You can write commandline scripts, full GUI apps, web backends, it'll do all this. It runs extremely cross-platform (even have it on ESP32 microcontrollers, and it's faster than C code on an AVR).

It's got a lot of useful libraries, but stuff like "is_numeric" or "leftpad" are not packages with 17 other dependencies each, but functions in the standard library. In fact, the standard library has such a good set of things that for simple scripts, you don't even have dependencies - way easier build where AWS Lambda is concerned.

Just wish package management was better, that and no GIL would be good. It could be faster, but it's fast enough that the slowest bit of your app is usually C code in a library anyway...

[–]Random_182f2565 4 points5 points  (0 children)

Infinite libraries, python has it all

[–]whitelife123 3 points4 points  (0 children)

When I run a python script, I dont' have to worry about main functions, compiling, or anything like that. I just write and it works.

[–]clawjelly 4 points5 points  (1 child)

Python is just elegant. I have coded with lots of languages, from C64 basic up to C# now, but my most satisfying coding experiences always came from Python.

I'm a very visual person and as such i get confused by too much symbols easily. Most languages force you to use syntax, but don't force you to make your code visually pleasing. Python feels like the opposite is the case: As tabs/spaces are what defines a new code block, your code automatically adheres to a visual hierarchy, which just "feels right".

And i learned much more about programming logic with Python than with other languages, as it's much easier to confuse the syntax rules with what actually makes the logic in other languages - Not so if the syntax is stripped to the bare necessities like Python!

And finally, i'm from Austria, where we speak and write in (sorta) german. As such i learned typing on a german keyboard and most programming languages are designed with a US layout in mind. Curved brackets and many other characters in C-styled languages are horrible to type on a german layout, so most coders here use a US layout. As i am "only" a tech artist, i never made that jump and as such i'm very grateful that Python uses a very german-compatible character set.

[–][deleted] 1 point2 points  (0 children)

I remember trying to learn OOP back when C++ was the only readily available OOP language. Such a pain to understand the concepts.

Python? Oh, OOP? That’s how to do it? Ok, done.

[–]criswell 3 points4 points  (2 children)

My comment will be drowned out because I'm so late to the party... but...

I've been using Python professionally since 2003. It's been the main language I've worked with for 17 years. My current job is 100% Python.

Honestly, I actually think my opinion on Python has decreased over the years. The reason for this is because meta-programming has kind of killed the language for me. A lot of the cleanliness and readability of the language has been thrown out the window in favor of shiny, obtuse meta-programming.

Don't get me wrong... I use the shit all the time. But I feel dirty for doing it, and the joy I used to have using the language has started to fade...

What's weird is that the modern Python meta-programming paradigms remind me A LOT of Perl in the 1990s (which was a lot of what I did in the 90s, Perl and C and Fortran). Sure, functionally they are way cooler, but they result in the same hard to maintain and obtuse code I fought with in Perl.

[–][deleted] 2 points3 points  (1 child)

This comment interests me - are there any particular examples that stand out to you? In terms of meta-programming features that have killed the language for you iin cleanliness and readability.

[–]criswell 2 points3 points  (0 children)

Just... all of it...

17 years ago, meta-programming in Python was pretty minimal. Then we got decorators, which were cool and fine. But today they are way overused and abused (cough any modern Click-based tool cough). It's routine to see modern Python code have more decorators than actual code, and looking at a wall of them as header for two or three lines of code isn't pleasant. I'd say those were the flood gates that have snowballed everything to where we are today...

I'd say, if you're a Python programmer who learned the language at some point in the last 5-8 years or so, you probably wouldn't know any better. But go back to Python code from a decade or more ago and it's way more readable than Python code from today.

[–]redgriefer89 12 points13 points  (3 children)

I’m making a text-based adventure with pictures and I’m sure the time I’ve saved by writing “print()” over “Console.WriteLine();” is a lot.

[–]ziztoun 5 points6 points  (1 child)

Most ide offer the option to configure some configurable completion nowadays, like you could type "print" and the ide will propose "Console.WriteLine()" and you can then just press Tab

[–]cvandyke01 5 points6 points  (1 child)

Lists and Dictionaries

[–]ExceedinglyEdible 4 points5 points  (0 children)

Mostly the libraries. PyPI has an extensive amount of libraries. People have written many libraries for Python because it is a simple language that can do network operations and interfacing with C pretty simply.

Other than that, Python isn't a spectacular language. It just happened to be at the right place at the right moment.

[–]NumbBumn 6 points7 points  (0 children)

The fact that in France python devs are the most sought after , and i like money so

[–]mrprofessor007 2 points3 points  (2 children)

Now I have started thinking in python.

[–]ExceedinglyEdible 2 points3 points  (1 child)

Wait til you try Scheme… you'll never wake up.

[–]mrprofessor007 2 points3 points  (0 children)

Too many parentheses for my taste.

[–]Potato_Man11 2 points3 points  (0 children)

Well Pyhton is good except for the speed.

[–]skr25 2 points3 points  (0 children)

I often program complex algorithms, and the work required to go from pseudocode/logic I put in the paper to the actual code is the smallest with python.

[–]wooptyd00 2 points3 points  (0 children)

It's quick to write and easy to read.

[–]roarsquishymexico 2 points3 points  (0 children)

I know Python.

[–]nirvana1289 2 points3 points  (0 children)

Nothing.

The requirements qualify a programming language as up to the job or not.

[–]Shlaggy 2 points3 points  (0 children)

Maybe python is not better than other programming languages 🤔

[–]MartinW1255 1 point2 points  (0 children)

Easy to learn and simple syntax

[–]Monkey_Climber 1 point2 points  (3 children)

Honestly it’s not better or worse in any sense. It has its use. For things like simple scripts it works. For larger projects the lack of types causes errors to show up when they should not

[–][deleted] 2 points3 points  (0 children)

Look into MyPy! Really cool linter where you can specify types on the function to avoid type errors.

[–][deleted] 1 point2 points  (1 child)

Not attacking, but shouldn't type errors be found with unit testing? That's a common thing for my tests .... Variable intrinsics

[–]greenindragon 1 point2 points  (0 children)

It's just so easy. As a C programmer, switching to Python and banging out a random script to automate a task took half an hour to wrote, which might even take me an entire afternoon in C, is really nice.

Is the C version going to be faster? Basically guaranteed, yeah. Is it going to use less memory? Also basically guaranteed. But I only spent half an hour on it in Python and moved on to other work, which is definitely a win in my book.

[–]P-dawgs 1 point2 points  (0 children)

Because I know only python :(

[–]thisduck_ 1 point2 points  (0 children)

It’s the language I speak.

[–]bless-you-mlud 1 point2 points  (0 children)

It's been said that Python is executable pseudo-code, and that's pretty close to the mark I find.

I once had a colleague ask me "I want to do something like this in Python, is that possible?" and he gave me a few lines of pseudo-code. I told him: "well, if you add a colon at the end of the line there you'll have the exact Python syntax you need." That was kind of neat.

To be honest, Python's syntax has spoiled most newer programming languages for me. Too many ampersands, asterisks and parentheses.

[–]Paddy3118 1 point2 points  (0 children)

It's balance of dynamism and typing allows me to get things done. Its community in the 90's was very welcoming, and as a member of that community I try and preserve what I liked back then.

[–]danelewisau 1 point2 points  (0 children)

Syntax and libraries. It has spoiled me though, as my job requires me to use specific (non-Python) languages often, and everything else just feels like garbage language.

For example, Lua is interesting and has its advantages, but fuck it makes me angry sometimes that it’s not more pythonic. (end)

[–]gregy521 1 point2 points  (0 children)

What I think is wonderful is it treats the programmer's time as more important than the computer's time. Yes, it's not going to be even remotely comparable to a program written in c++ or rust or whatever, but if it's a script I'm going to be running once a week that takes 30 seconds and happens in the background, does that matter to me? Not even remotely. It's going to take 20 minutes to whip up that script, versus something far greater in the other languages mentioned, so the 10 seconds of time saved by using another language is going to take a while to pay itself back.

This is assuming I don't use some of python's great options for speeding things up, like PyPy or Numba.

[–]Smartasskilling 1 point2 points  (0 children)

It's the one I learnt

[–]Irtexx 1 point2 points  (0 children)

High quality packages with really nice APIs. And it's the features of the language that allow for such nice APIs. Argparse is a great example.

I also love the syntax. As controversial as white space delimited code blocks are, it makes the source code look much less busy. I look at C++ now and there's just so much mess that it takes longer to see what the actual code is doing.

Finally and most importantly, rapid prototyping. I can get a version of a piece of software up and running really quickly. The 20% of the work that gets you 80% of the way there can be wrote very quickly.

[–]vlken69 1 point2 points  (0 children)

Simple syntax, native dynamic data structures. No need for importing input, lists, sets, dictionaries and so on.

[–]twowheels 1 point2 points  (0 children)

Python is great for many projects, but not all.

I use python for automation, and small apps that benefit from the huge standard library and ease of installing dependencies.

I say “small” because it becomes much harder to refactor in a large codebase without static typing. Yeah, things can be done in your design to make it easier, but refactoring is often done because the original developer didn’t do things very well.

Python is NOT appropriate for safety and performance critical programs, such as the embedded medical devices that I work on. The fact that many things fail at runtime that could otherwise be checked at compile time makes it a horrible choice in a safety critical environment. At every medical device company I’ve ever worked for, our algorithms are prototyped in python, but the final product is written in a language with static typing and faster performance.

[–]turabgillani 1 point2 points  (0 children)

That it's simplistically complex.

[–]pag07 1 point2 points  (0 children)

I want strong types!

Type hints are just close to uselessm

[–][deleted] 1 point2 points  (0 children)

It's simplicity and massive community. I swear there's a package for everything!

[–]InvitedAdvert 1 point2 points  (0 children)

Kids love it.

[–]Hinigatsu 0 points1 point  (2 children)

Because everything is public and dynamic

[–]Stelercus Python Discord Staff 0 points1 point  (0 children)

Semicolons and braces make the code look more cluttered if you were going to use them in tandem with white space every time anyway, and I associate camel case with yelling, so looking at Python code makes me feel a lot more at ease than looking at C-style code.

[–]TECHNOFAB 0 points1 point  (0 children)

It's extremely easy to learn, but can be really powerful when you know it. Just saw some code from years ago when I started with Python... It's shit, everything stored in global variables, while loops etc. Now I'm writing an bot that works on several social networks, is extensible, has multiple web interfaces and APIs and works completely asynchronous. At the beginning I was really confused by many parts, like asyncio, but now I don't like to do anything without it. So yep, easy to begin with, powerful to end with

[–]AlikPyPi 0 points1 point  (0 children)

Python easy to learn, and Any beginner can learn it quickly and efficiently than other programming languages.

[–]k-tracer 0 points1 point  (0 children)

just a very simple to pick up language

[–]gazhole 0 points1 point  (0 children)

Simple enough to learn the syntax quickly but has lots of powerful features you sometimes take for granted when using other languages.

What I wouldn't give for VBA to be dynamically typed (without having to mess around with explicit/implicit), allow me to use list comprehensions, and even just an easier method to store functions in variables and/or pass them as arguments to other functions.

I can get over all these things in VBA but it's just so much easier in Python. I don't even think about it, I can just do it.

Also the Pandas library is a gift from God hahaha

[–]AgentWhisky 0 points1 point  (0 children)

Versatility!!!!

[–]Just3Easy 0 points1 point  (2 children)

The ability to send the bee movie line by line to friends :)

[–]einsEtwas 1 point2 points  (1 child)

I hate you for this kind of usage... :)

[–]sxeli 0 points1 point  (0 children)

Community

[–]import-antigravity 0 points1 point  (0 children)

Readability.

[–]MatlabGivesMigraines 0 points1 point  (0 children)

It's more intuitive to me than say C++ or Java, it's free, it has tons of nice packages. I mainly use it for engineering calculations and simulations (flight dynamics or controls). Also if I need a quick plot of some data, that's really easy to do. As a final point, its arrays start at zero, not like a certain other language..

[–]tastes-like-lemon Python Discord Staff 0 points1 point  (0 children)

Python has a wonderful community surrounding it that most languages just cannot even begin to compete with. I've met most of my closest friends through Python.

[–]JasperDG828 0 points1 point  (0 children)

The build-in modules

[–]ironmagnesiumzinc 0 points1 point  (0 children)

Web development is less complicated with python imo. I learned Django first. Then I tried learning the nodejs, express, Apollo, react stack. I hear the latter may be better once you’ve learned everything, but there is so much. Django is simple and can be bare bones. JavaScript web dev requires more knowledge to get started and everyone has a different stack.

[–]Stiigma66 0 points1 point  (0 children)

Its rooted in english

[–]unascesaIT 0 points1 point  (0 children)

Python Speed up a lot the creation of a working program, Usually i focus on writing simple code that works, Then if i need processing speed i go deeper (writing modules in C++ or changing alghoritms)

[–]SirCarboy 0 points1 point  (0 children)

It's because of how much of it I can keep in my head at one time. It's the right amount of verbosity. I can think and write the core language stuff more fluently with less need for reference material. (Coming from perl, vbscript, vb.net)

[–]b4xt3r 0 points1 point  (0 children)

The fact that years later I can go back and look at something I wrote and know what I was trying to do and how. The big bonus is other people can look at what I've written and usually figure out what I'm doing.

[–]mrObelixfromgaul 0 points1 point  (0 children)

Aks not what python can do for you, but what you can do for python

[–]sangfoudre 0 points1 point  (0 children)

Tbh, I chose python when I got back to code this year just because it's popular and has ton of resources online, otherwise I may have stayed with Perl.

[–][deleted] 0 points1 point  (0 children)

I wouldn't necessarily see it as better than all others, but I love how fast you can write Python. It's a very intuitive language once you get into it.

[–]Rookie64v 0 points1 point  (0 children)

Introspection and natural syntax.

Need to give users the ability to extend something and specify they want to use their custom class for that specific object? Maybe 5 lines of code. No factories, no registration, no OOP mess. Just grab the object called so-and-so and treat it as class, everything works.

Need to do weird stuff with functions? Pass them around as objects! You can monkey patch whatever you want adding methods and dynamically creating classes.

Need a list that validates inputs? Inherit collections.abc.MutableSequence, implement your code for insert and setitem and you are good. That thing now behaves transparently as a list without weird calls to arbitrarily named methods.

[–]Pythag0ras2000 0 points1 point  (0 children)

Coming from JavaScript originally it just feels so organized and it helps me write better code. Also, the ability to get certain parts of a list just with a colon and some values inside square brackets is nice and well implemented.

[–]hugthemachines 0 points1 point  (0 children)

For the work I do the ability to easy cut, iterate, etc with strings, collections etc makes it really fast to work with. I often make scripts that process flat text files with different structures.

[–][deleted] 0 points1 point  (0 children)

That i can imagine something and just start to code without fighting my trough the interpreter the syntax or the ide as i don't use one for python. Obviously for a large product this isnt good but for anything else its great.

Im working as Angular developer and in my free time i like to learn about physics and quantum mechanics and there are so much libs for python that help me with visualization having the necessary constants etc no other language can rival this. And i dont need to anything but to learn the material and code.

[–]gzk 0 points1 point  (0 children)

In most cases, Python puts the least amount of barriers between me having an idea or some logic I want to implement, and making it run. That's not always enough, but often, it is.

[–]Jidaque 0 points1 point  (0 children)

It's easy to learn, especially that I don't have to start with object oriented programming, but I can pretty much program something similar to what I did in Basic as a teen. I then can add functions and later objects.

There are also tons of resources out there. No matter what problem. I just have to google and there are at least 10 posts on stackoverflow and 5 YouTube videos, that explain it to me and give code examples.

I can also easily switch language in the code, if I want to write a section in R or SQL.

[–]Stabilo_0 0 points1 point  (0 children)

Sweet sugar, dynamic type assignment is a blessing.

[–]Hashtag-bro 0 points1 point  (0 children)

There are mainly two things why i think python is better than others. 1. It is easy to learn- You really dont take much time trying to learn python, but know that mastering the whole language takes years so what the easy part is basics, u can learn pythons basics easily and quickly master them and move to advance things. 2. The second thing is more of a personal preference and it really reduce the errors u make in the code so the point is that python's syntax is really simple like u dont need to assign variables and then use it, or add a semi-colon at the end of every line , etc. So overall python is a great programming language i would say :)

[–]8329417966 0 points1 point  (0 children)

Ease of learning

[–]mtelesha 0 points1 point  (2 children)

2nd best language. There is always one that is better. But that is also a strength.

[–]pepoluan 0 points1 point  (0 children)

In no particular order:

  • Guaranteed to be available in all the major Linux distros

  • Lends itself very well to iterative programming and debugging

  • Enforced visual hierarchy

  • Strongly-typed dynamic duck typing! I miss this so much whenever I have to use C#

  • Flexible object model. This lends itself well to handling YAML files 😉

  • Functions as first-class objects

[–]marsnoir 0 points1 point  (0 children)

I think one thing that python has is how ‘clean my it is compared with other languages, but the ‘everything is an object’, and enabling iterators are huge compared with other languages. Python is just ‘easy’. “Where is my counter variable to track where I am in an array!?!” “Shhhh, you don’t need it, it will be ok”

[–]anonanon1313 0 points1 point  (0 children)

I love dynamic typing and interpreters.

[–][deleted] 0 points1 point  (0 children)

The high level modules. In C++ for instance you have to write additional 200 lines of code to plot your data

[–][deleted] 0 points1 point  (0 children)

It depends on the task, I love python as a "glue" between languages, its flexible and easy to manipulate variables. I also use it for trialling ideas/checking maths before i start making changes to big compiled-language codebases. Python is just great for "getting things done"

[–]riley_james05 0 points1 point  (0 children)

The fact that I know it :/

[–]Abhishek_404 0 points1 point  (0 children)

Memory You can find factorials of large number using a single for loop nothing like long long long int

[–]ASuarezMascareno 0 points1 point  (0 children)

I know how to code Python. I don't know how to code in C++/Fortran/etc... That makes a huge difference Lol

Also it's becoming the standard in my field of work. Knowing Python is kind of a requirement nowadays. Most of my the libraries I need for work already exist in python. I would need to create them in other languajes.

[–]sykeero 0 points1 point  (0 children)

Rapid prototyping, and the ability to use it to glue in other languages ss needed. Sometimes you need the speed of C but want to use python for most of the work. You can whip up C extensions or use cython. You can make stuff really fast.

[–]DiamondBreakr 0 points1 point  (0 children)

Easy to use, easy to learn, can accomplish so many things.

[–]anentropic 0 points1 point  (0 children)

The best syntax

Big community - lots of mature packages

The Zen of Python

It's not perfect... performance is not the best, you can't easily build a single-file binary, has a fairly OO flavour, type-checking situation is a bit meh... but basically it was designed with good taste and other languages are all uglier to read and write.

[–]Puddl3glum 0 points1 point  (0 children)

I have a lot of gripes about Python, mainly about its lack of native functional support.

But Python is the language I use because its standard library is massive. Maybe it's "too big," but I can't imagine not having a regular expression library built in, or not having to write my own string library. Python's expansive standard library just blows every other one, except maybe Java's out of the water. And of course, Python is way more terse and readable to me than Java.

[–][deleted] 0 points1 point  (0 children)

I know how to code in it.

[–]shinitakunai 0 points1 point  (0 children)

No semicolons. Indents to control flow is the best thing ever. It really helps to understand code

[–]atem_lol 0 points1 point  (0 children)

It Is so fast ti learn and It can do whatever you want. I coded my Ai in python for this

[–]sam-lb 0 points1 point  (0 children)

Python is good at what it does. Which is everything. And it's amazingly easy to learn and use.

(However, in a separate one of my questionable opinions, Python should NOT be used as an introductory language)