Tip 1 Hello, World!

Pythonic Programming — by Dmitry Zinoviev (9 / 116)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Chapter 1 Documentation Tips | TOC | Import This 👉

★2.7, 3.4+ Python has its own way of saying “Hello world!” — the first program you must have written when you learned to code. You don’t even need to know how to do the printing. Import the module __hello__ and enjoy the greeting:

​ ​import​ ​__hello__​​=> ​Hello world!​

I hear you ask, What is the point of having this useless module? __hello__ is an Easter egg: an unexpected or undocumented feature in computer software included as a joke. Jokes are fun, and programming is fun, too. Let’s have fun.

👈 Chapter 1 Documentation Tips | TOC | Import This 👉

Pythonic Programming by Dmitry Zinoviev can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.