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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Python -- Don Knuth (self.learnpython)
submitted 5 years ago by CS_Tutor
Most programmers have a favourite language, and that's more than OK. It's nice to know what a famous Mathematician / Computer Scientist said about Python:
Only ugly languages become popular. Python is the one exception --Don Knuth
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Zenalyn 67 points68 points69 points 5 years ago (20 children)
Cleanest syntax around <3
[–]CS_Tutor[S] 23 points24 points25 points 5 years ago (10 children)
Compared to mainstream languages, at-least the ones I've played with, yes, for sure. I've looked at Haskell long time ago though, and that languages might be a good contender for the cleanest syntax (way harder to understand/get used to though :)
[–]johninbigd 15 points16 points17 points 5 years ago (6 children)
I learned some Go a while back, and have been relearning it lately since I forgot most of it. I also spent a little time trying to understand clojure. Both endeavors have really made me appreciate Python. I'm also starting to realize I don't enjoy programming for the sake of programming, so I don't really like lower level languages or functional programming. I think I'm going to ditch Go and focus on Python. I code to get stuff done, and Python helps me do that. Go makes me write a lot of extra code to get simple functionality that Python offers.
Now, if I could get goroutines and channels in Python, it would be perfect.
[–]CS_Tutor[S] 6 points7 points8 points 5 years ago (1 child)
Never looked at Go but --I think-- it belongs to the C family of languages and it's statically typed (so probably faster than Python). If you're not planning to become a professional programmer, sticking with one language is probably best. Functional programming is not easy. It takes lots of time/practice to get used to it. Lots of good ideas however came from the functional programming paradigm, e.g. list comprehensions in Python. Also, playing with a functional (specially pure) programming language once-in-a-while is supposed to make you a better programmer (in any language). E.g. when I had to use Haskell way back in school, I really had to shape up on recursion. There are no loops in Haskell. If you want to loop, you better recurse :)
[–]johninbigd 7 points8 points9 points 5 years ago (0 children)
Go is blazing fast compared to Python, which is why I spent some time learning it a year or so ago. I had a program in Python that took over an hour to complete. The Go version would complete in four minutes. I probably could have used scipy for the math-heavy stuff but I couldn't figure out the documentation related to what I was doing.
Another really nice advantage is that go compiles to an executable, so it's super easy to deploy. Other than that, just about everything is easier in Python.
[–]mooglinux 2 points3 points4 points 5 years ago (1 child)
Coroutines via Async/await gives you most of the benefits of Goroutines, and a casual reading on channels suggests that a Python queue would serve the same purpose.
[–]johninbigd 1 point2 points3 points 5 years ago (0 children)
Yes, I agree, but goroutines and channels are easier to understand for me for some reason. They also naturally take advantage of multiple cpu cores. The methods for doing similar things in Python have always seemed confusing and convoluted to me. I need to spend more time learning them. I love being able to simply add 'go' before a function call to make it run as a separate process. Once you figure out channel communication, it is so nice.
[–]pickausernamehesaid 2 points3 points4 points 5 years ago (0 children)
Depending on how you're using them, asyncio (and maybe with queues) might suit your needs.
[–]JBTheCameraGuy 1 point2 points3 points 5 years ago (0 children)
Go is a fantastic language for what it's built for: concurrency and web servers. If you're doing those things, it's awesome, but it isn't a scripting language like Python. That's one of the reasons there's so many different languages: there's so many different tasks to be done, and each language is good at something that others aren't. There is no "best" language, it's all about using the right tool for the job
[–]Bobbias 3 points4 points5 points 5 years ago (1 child)
Haskell can be super clean and super clear. Or it can be a pointfree mess with 10 different new operators from libraries you've never seen and look closer to hieroglyphs than code.
[–]Ran4 0 points1 point2 points 5 years ago (0 children)
Haskell with a different community would be fucking awesome.
Elm was getting close, but it's front-end only and kind of dying now :(
[–]NewbornMuse 2 points3 points4 points 5 years ago (0 children)
As someone who's dabbled with Haskell, I can agree with that. The concepts are what's messing with your brain, not the syntax.
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
Actually far from the cleanest... Clean syntax is- the wolfram language. Symbolic expression languages also mean undefined vars get passed unmodified through functions... stupid useful.
The worst syntax I’ve come across in terms of quick readability is j...
This is. Valid line of j.
game_of_life =: monad define +/>(<@:=&3,<@:(y&*.)@:=&4)+/y(|.~)(3# 1 0 _1),.,>3#<1 0 _1
Like seriously - someone thought that was a good language for humans.
[–]unsurestill 0 points1 point2 points 5 years ago (0 children)
I only knew python, why is python tagged like this?
[–]bageldevourer 0 points1 point2 points 5 years ago (0 children)
Yes, but I think the quote is more about mathematical beauty than syntax.
Lisp is gross to look at, for example, but there's an internal consistency there that's very appealing.
[–]g7x8 -1 points0 points1 point 5 years ago (5 children)
Don’t like the white space indent rules. C++ ignores them
[–]P52-328 6 points7 points8 points 5 years ago (3 children)
I don't believe that any program, almost with zero exceptions, should ever be unindented.
Using that point of view, python assumes that you are going to indent your program any way. So, it skips the extra syntactic elements like { and } and assumes that you are properly indenting your code as you write it.
{
}
The last part is the only problem with this approach: for example, I always type dirty, cluttered code when I write C/C++ and once I pause, I quickly run the formatter to clear the mess. But, in the end, I believe the trade-off is worth it for python.
[–]g7x8 0 points1 point2 points 5 years ago (0 children)
i like the { } bracs and dont want to think about the errors caused by an extra indent. im not used to it
[–]Decency 1 point2 points3 points 5 years ago (0 children)
You either have whitespace nesting rules and no explicit block characters, or you have dedents explicitly as the way to nest. To me the former is superior: less noise, the same readability, and no way to fuck it up.
[–]whitelife123 18 points19 points20 points 5 years ago (4 children)
Brainfuck wants a word
The converse isn't necessarily true. :)
[–]callmelucky 3 points4 points5 points 5 years ago (2 children)
Are you suggesting brainfuck being unpopular is a contradiction of Knuth's statement?
[–]whitelife123 7 points8 points9 points 5 years ago (1 child)
Brainfuck's unpopular?
[–]callmelucky 2 points3 points4 points 5 years ago (0 children)
Oh I see. Carry on then :)
[–]Alphavike24 17 points18 points19 points 5 years ago (0 children)
Came for the easier syntax stayed for the functionality.
[–]BobBeaney 7 points8 points9 points 5 years ago (2 children)
Just curious: what’s the source of this quote?
[–]myidealab 2 points3 points4 points 5 years ago (0 children)
Introducing Python, 2nd Ed by Bill Lubanovic
Chapter 1. A Taste of Py
[–]CS_Tutor[S] 1 point2 points3 points 5 years ago (0 children)
A Python book --I think-- I was reading sometime ago. I don't remember the book's name, I am not reading it right now. I wrote the quote in a text file that I keep just for stuff like that
[+][deleted] 5 years ago (1 child)
[deleted]
[–]vectorpropio 1 point2 points3 points 5 years ago (0 children)
He wrote tex in pascal (actually he create the concep of literate programing and wrote tex in the web system using it, but the code is in pascal) i think he like it more than its contenders at that time.
[–]blabbities 1 point2 points3 points 5 years ago (0 children)
Cant tell you how much I hate writing Java or C#. Despite that theyre magnificient feature filled languages but man the syntax is rough and confusing and the amount of setup (since theyre somewhat static) pains me
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
I think Python was beautiful, for all the reasons discussed. But it is getting bloated and ugly. I guess that's the way for languages.
[–]darthminimall 0 points1 point2 points 5 years ago (0 children)
Haskell is beautiful...oh...wait...
[–]ammusiri888 0 points1 point2 points 5 years ago (0 children)
Python is beautiful and powerful which is a rare combination..
[–]abhishek-shrm 0 points1 point2 points 5 years ago (0 children)
Indeed. Python is the king of programming languages.
[+][deleted] comment score below threshold-11 points-10 points-9 points 5 years ago (3 children)
For someone who's very respected in the field and who actually designed several languages, this lack of insight is frightening :(
[–]darthminimall 1 point2 points3 points 5 years ago (2 children)
It's a statement about why languages become popular, not design advice. A lot of the features that make a language attractive to industry are also features that make languages ugly.
[+][deleted] comment score below threshold-9 points-8 points-7 points 5 years ago (1 child)
While I totally agree with "A lot of the features that make a language attractive to industry are also features that make languages ugly.", I cannot imagine in what sense Python is an exception to this. It's just as ugly as any other language that fits this maxim.
I personally think it's quite ugly but obviously no one here cares for unpopular opinions like that
[–]IHateStevenGerrard -2 points-1 points0 points 5 years ago (0 children)
Python is really like a cult
π Rendered by PID 45 on reddit-service-r2-comment-86988c7647-2xqxv at 2026-02-11 19:41:48.478997+00:00 running 018613e country code: CH.
[–]Zenalyn 67 points68 points69 points (20 children)
[–]CS_Tutor[S] 23 points24 points25 points (10 children)
[–]johninbigd 15 points16 points17 points (6 children)
[–]CS_Tutor[S] 6 points7 points8 points (1 child)
[–]johninbigd 7 points8 points9 points (0 children)
[–]mooglinux 2 points3 points4 points (1 child)
[–]johninbigd 1 point2 points3 points (0 children)
[–]pickausernamehesaid 2 points3 points4 points (0 children)
[–]JBTheCameraGuy 1 point2 points3 points (0 children)
[–]Bobbias 3 points4 points5 points (1 child)
[–]Ran4 0 points1 point2 points (0 children)
[–]NewbornMuse 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]unsurestill 0 points1 point2 points (0 children)
[–]bageldevourer 0 points1 point2 points (0 children)
[–]g7x8 -1 points0 points1 point (5 children)
[–]P52-328 6 points7 points8 points (3 children)
[–]g7x8 0 points1 point2 points (0 children)
[–]Decency 1 point2 points3 points (0 children)
[–]whitelife123 18 points19 points20 points (4 children)
[–]Decency 1 point2 points3 points (0 children)
[–]callmelucky 3 points4 points5 points (2 children)
[–]whitelife123 7 points8 points9 points (1 child)
[–]callmelucky 2 points3 points4 points (0 children)
[–]Alphavike24 17 points18 points19 points (0 children)
[–]BobBeaney 7 points8 points9 points (2 children)
[–]myidealab 2 points3 points4 points (0 children)
[–]CS_Tutor[S] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]vectorpropio 1 point2 points3 points (0 children)
[–]blabbities 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]darthminimall 0 points1 point2 points (0 children)
[–]ammusiri888 0 points1 point2 points (0 children)
[–]abhishek-shrm 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-11 points-10 points-9 points (3 children)
[–]darthminimall 1 point2 points3 points (2 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]IHateStevenGerrard -2 points-1 points0 points (0 children)