Skip to main content

Command Palette

Search for a command to run...

Hardest hello world program of Python lol

😂 Lol

Updated
•1 min read
S

I'm a software developer from India. :india:

I live in Shrirampur City, Maharastra :india:

I'm currently learning Back-end Web Developing via Python Programming Language.

So This is just for fun.

Most People said to me because I Started Using Python Mostly in my projects.

And They Tell Me That Python is not a Real programming language or Python is For Kids because it is too easy to write.

So for just fun.

I created a repo with various ways of writing Hello World Program In Python.

For Starters It Started Like this.

Program for Beginners

print('Hello World!')

Difficulty Level 0 : Program With Shebang

#!/usr/bin/env python3
print('Hello World!')

Difficulty Level 1 : Program With variable

#!/usr/bin/env python3

message = 'Hello World!'

print(message)

Difficulty Level 2 : Program With Main Condition

#!/usr/bin/env python3

message = 'Hello World!'

if __name__ == '__main__':
    print(message)

Difficulty Level 3 : Program With external function.

#!/usr/bin/env python3

msg = "Hello World!"

def display_msg(message):
    print(message)

if __name__ == '__main__':
    display_msg(message)

Difficulty Level 4 : Program With .env file and running process

#!/usr/bin/env python3
import os
from dotenv import load_dotenv

load_dotenv()  # take environment variables from .env file

msg = os.getenv('MESSAGE')

def display_msg(message):
    print(message)

if __name__ == '__main__':
    display_msg(msg)

running proces at https://github.com/shriekdj/hello-world-py/tree/main/hello_by_legends/legend_hello_4

Repo Is At

It Will Become more difficult by time just wait for it.