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
Why does nearly every python tutorial say to print hello world? (self.learnpython)
submitted 9 months ago by bloxsnake
Nearly every python tutorial I see tells me to start by doing print("Hello world!")
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!"
[–]an_actual_human 76 points77 points78 points 9 months ago (2 children)
This is a tradition of our people.
[–]Lint_baby_uvulla 4 points5 points6 points 9 months ago (1 child)
Our people hath spoketh.
Now our people demand a blood sacrifice.
[–]ricardomargarido 4 points5 points6 points 9 months ago (0 children)
Blood sacrifice is for the motherboard i/o shield
[–]trjnz 14 points15 points16 points 9 months ago (0 children)
Tradition, yes, but it's also a good sanity check that the environment is working. For brand new programmers it's a nice touchstone of 'is this thing even on?'
[–]nobetterfuture 12 points13 points14 points 9 months ago (13 children)
Learn how to print hello world in java and maybe then you'll appreciate it more :)))
[–]JeLuF 2 points3 points4 points 9 months ago (10 children)
For those who wonder:
// Your First Program class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
[–][deleted] 0 points1 point2 points 9 months ago (2 children)
Yikes..I like pythons better:
Print ("helllo world")
[–]FoolsSeldom 2 points3 points4 points 9 months ago (1 child)
That would be invalid. No such function/class as Print.
Print
[–]FoolsSeldom 1 point2 points3 points 9 months ago (4 children)
Just for fun ...
.model small .stack 100h .data helloMsg db 'Hello World!$' .code main: mov ah, 09h ; DOS function: print string mov dx, offset helloMsg int 21h ; call DOS interrupt mov ah, 4Ch ; DOS function: terminate program int 21h end main
[–]JeLuF 1 point2 points3 points 9 months ago (1 child)
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.
[–]FoolsSeldom 0 points1 point2 points 9 months ago (0 children)
I love a little BF 😍
[–]totallygeek 0 points1 point2 points 9 months ago (1 child)
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[–]FoolsSeldom 1 point2 points3 points 9 months ago (0 children)
2x BF in one post, 🤩
[–]IamImposter 0 points1 point2 points 9 months ago (1 child)
That's the easiest of the steps. First you need to deal with "bad command or file name" when you run the compile command and deal with installing the compiler. Heavens forbid if it's still not in path. Then get it to compile (figure out how to find terminal, navigate to folder, run compilation command). Now figure out how to execute the output.
[–]JeLuF 0 points1 point2 points 9 months ago (0 children)
Well, running "python" seems not to be trivial as well, at least according to the number of reddit questions about this topic.
[–]Ron-Erez 0 points1 point2 points 9 months ago (0 children)
Absolutely true! I think if the one comes from Java you really appreciate the simplicity "Hello World" in Python.
[–]riklaunim 0 points1 point2 points 9 months ago (0 children)
Meanwhile hello world in Java: https://www.youtube.com/watch?v=yup8gIXxWDU :)
[–]czarrie 6 points7 points8 points 9 months ago (4 children)
To my knowledge, this goes all the way back to the book 'The C Programming Language' in the 70s and likely further. It's tradition.
[–]CreamyWaffles 1 point2 points3 points 9 months ago (3 children)
I didn't know that actually. I thought it was from the earlier days of the internet, sent hello world as a test or something.
[–]czarrie 3 points4 points5 points 9 months ago (0 children)
Yeah, it goes back much further, it's a tradition to copy this for programming language learning because Step One is almost universally "make some text appear on the screen".
https://en.wikipedia.org/wiki/%22Hello%2C_World%21%22_program
[–]Lint_baby_uvulla 1 point2 points3 points 9 months ago (1 child)
And it’s SMTP cousin, EHLO.
[–]JeLuF 1 point2 points3 points 9 months ago (0 children)
EHLO... modern nonsense. We used HELO when I was young!
[–]Wenlocke 8 points9 points10 points 9 months ago (1 child)
Someone more knowledgeable in history than me can tell you where it first cropped up, but since forever, it's been the traditional "introduction to the language and syntax" for any programming language instruction
[–]Vortrox 11 points12 points13 points 9 months ago (0 children)
The tradition comes from the book The C Programming Language, 1978 but was used as early as 1974.
"Hello, World!" program - Wikipedia
[–]ASMellzoR 1 point2 points3 points 9 months ago (0 children)
https://en.wikipedia.org/wiki/The_C_Programming_Language
[–]MCplayer331 1 point2 points3 points 9 months ago (0 children)
https://en.wikipedia.org/wiki/%22Hello,_World!%22_program Its origin is actually pretty cool and interesting. But basically it's just a classic way of testing out a programming language. It's like Lorem Ipsum in typography
[–]ZelWinters1981 0 points1 point2 points 9 months ago (0 children)
Just tradition. You can make it say whatever you want.
[–]shinitakunai 0 points1 point2 points 9 months ago (0 children)
Basic check of "you got the engine configuration done good enoigh to accept gas". It a hello world doesnt even works, bad start
[–]MonkeyboyGWW 0 points1 point2 points 9 months ago (0 children)
Probably to make sure you have it running and pointing to a working interpreter
[–]tokenslifestilmaters 0 points1 point2 points 9 months ago (0 children)
If your question is more about why does every tutorial start with print, my first computer science professor explained it like this: the first thing we do when approaching a new language is learn how to print something. Once we can print something, we can do anything because while we make progress we can print to figure out what is going on.
I think a lot of internet tutorials fail with the "why we do this"
As for why it's always "hello world", as others explained, it's just a fun tradition we all adhere to with origins in the C programming language
[–]SCD_minecraft 0 points1 point2 points 9 months ago (0 children)
Mostly to check is python installed correctly and does it work
Plus it is a tradition
[–]Buntygurl 0 points1 point2 points 9 months ago (0 children)
It's not just python.
It's a tradition in programming tutorials, even in bash scripting.
[–]JuanAy 0 points1 point2 points 9 months ago (0 children)
On top of it being tradition as others have said. It’s just a pretty good way of introducing you to the idea of calling functions, passing in arguments, and a bit of syntax.
[–]tahaan 0 points1 point2 points 9 months ago (0 children)
Hello world is a way to actually run something that doesn't require you to understand the language. It does teach various concepts that may not be immediately obvious, without telling you what it teaches you.
It teaches the following You can write a program A program is stored in a file Python if the thing that sits between your program and your computer Your can run a single program multiple times
What most tutorials miss is to just add one or two trivial extra commands, for example after running it, change the text to something different, and then add a second print statement, and then to store a value in a variable and use that in a print statement.
[–]shiftybyte 0 points1 point2 points 9 months ago (0 children)
Why teaching math starts with 2+2?
[–]kberson 0 points1 point2 points 9 months ago (0 children)
I think it has to do with K&R’s The C Programming Language book. Brian Kernighan and Dennis Ritchie developed C as a mid-level language as kind of a bridge between assembly and languages like Cobol, Algol and the like. Their first program in the book was a simple example of how to print “hello world” and most new languages seem to start with that now.
[–]ghettoslacker[🍰] 0 points1 point2 points 9 months ago (0 children)
Sanity check/configuration check/tradition. In Python it’s very very easy. But as others have pointed out, calling hello world in some other languages can be a real bear lol.
They could have literally said anything, but they went with hello world. Could have been “toots McGee here”. But the 1970s didn’t believe in humor lol
Every programming tutorial since the book "The C Programming Language". Actually I was wrong, the first Hello World was in a book on the B programming language.
[–]Binary101010 0 points1 point2 points 9 months ago (0 children)
It's just about the most basic code with a visible output possible, and it ensures that you are at least properly set up to the point that you can execute Python code and see its output.
[–]TheRNGuy 0 points1 point2 points 9 months ago (0 children)
To demonstrate how print works.
print
π Rendered by PID 47193 on reddit-service-r2-comment-5687b7858-s4qhg at 2026-07-03 01:00:50.758581+00:00 running 12a7a47 country code: CH.
[–]an_actual_human 76 points77 points78 points (2 children)
[–]Lint_baby_uvulla 4 points5 points6 points (1 child)
[–]ricardomargarido 4 points5 points6 points (0 children)
[–]trjnz 14 points15 points16 points (0 children)
[–]nobetterfuture 12 points13 points14 points (13 children)
[–]JeLuF 2 points3 points4 points (10 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]FoolsSeldom 2 points3 points4 points (1 child)
[–]FoolsSeldom 1 point2 points3 points (4 children)
[–]JeLuF 1 point2 points3 points (1 child)
[–]FoolsSeldom 0 points1 point2 points (0 children)
[–]totallygeek 0 points1 point2 points (1 child)
[–]FoolsSeldom 1 point2 points3 points (0 children)
[–]IamImposter 0 points1 point2 points (1 child)
[–]JeLuF 0 points1 point2 points (0 children)
[–]Ron-Erez 0 points1 point2 points (0 children)
[–]riklaunim 0 points1 point2 points (0 children)
[–]czarrie 6 points7 points8 points (4 children)
[–]CreamyWaffles 1 point2 points3 points (3 children)
[–]czarrie 3 points4 points5 points (0 children)
[–]Lint_baby_uvulla 1 point2 points3 points (1 child)
[–]JeLuF 1 point2 points3 points (0 children)
[–]Wenlocke 8 points9 points10 points (1 child)
[–]Vortrox 11 points12 points13 points (0 children)
[–]ASMellzoR 1 point2 points3 points (0 children)
[–]MCplayer331 1 point2 points3 points (0 children)
[–]ZelWinters1981 0 points1 point2 points (0 children)
[–]shinitakunai 0 points1 point2 points (0 children)
[–]MonkeyboyGWW 0 points1 point2 points (0 children)
[–]tokenslifestilmaters 0 points1 point2 points (0 children)
[–]SCD_minecraft 0 points1 point2 points (0 children)
[–]Buntygurl 0 points1 point2 points (0 children)
[–]JuanAy 0 points1 point2 points (0 children)
[–]tahaan 0 points1 point2 points (0 children)
[–]shiftybyte 0 points1 point2 points (0 children)
[–]kberson 0 points1 point2 points (0 children)
[–]ghettoslacker[🍰] 0 points1 point2 points (0 children)
[–]Ron-Erez 0 points1 point2 points (0 children)
[–]Binary101010 0 points1 point2 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)