Python print() Function – Hello World!

Python Language is encouraged programmers to write a program without boilerplate code. The simplest directive (instruction or command) in Python is the “print” directive. The Python Print() simply prints out a line with includes a newline (unlike in JAVA – println() and C needed extra code). To print strings, numbers etc, In Python 3 + is it too easy, just write print(“Hello World”).

Python print() Function - Hello World! - Learn Python

Syntax 

It’s a Simple Python statement hello world output Example.

Output: Hello World

Some more Examples

Here is some example of how you can print content as per requirements.

The print blank line in python :

How to print 5 or more blank lines

Print more than one object :

You can print easily one more object in print() function like this

Output: Hello, how are you?

Specify the separator:

In Python, it’s easy to separate output messages using sep="-" like this

Output : Title – Description

Python programming language is very easy, it’s just like a general speaking language. As you know every programming language has own syntax, so it really needs to you learn and does the practice of syntax.  Print the output in console may be your firth programme, how to print a hello world in python or Python first programme.

Do comment if any doubt, suggestion or example for same.

Note: This example (Project) is developed in PyCharm 2018.2 (Community Edition)
JRE: 1.8.0
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

Python 3.7

All examples are in Python 3, so it may change its different from python 2 or upgraded versions.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.