Hello World!
Hello World!

Hello World!

?There is this tradition of when starting with a new computer program language, we create a “Hello World!” program.

Which lead to an informal metric of how sweet it is the learning curve of a new computer programming language by how easy it is to create the first “Hello World!”.

Python is definitely a champion on that matter, with the very straightforward one liner:?

Simple

However, are you aware that it exists an even easier and shorter way of getting a “Hello World” in Python?

Using the not so widely known “__hello__” module:?

Simpler

Funny enough, when using the “__hello__” module inside the interpreter, it becomes “more complex”!… Two lines! ??

Not so simple...

Of course we could make it an one-liner by putting the two statements in the same line, separated by a semicolon.

However, it wouldn’t be Pythonic!… ??


Raul Tavares

Open to the next wonderful project - Senior Software Engineer / Full Stack / DevOps / Python passionate. Contract or Perm.

11 个月

Anton Sü?, you always enjoyed this small Python peculiarities... ??

回复

要查看或添加评论,请登录

Raul Tavares的更多文章

  • I love what I do

    I love what I do

    I love computer programming, software development and creating software applications. It may look like equivalent…

    1 条评论

社区洞察

其他会员也浏览了