---Advertisement---

How to Print with Examples :Python print() Statement Master the Art of Printing with Real-World Examples 2025

By Bhavani

Published On:

---Advertisement---

How to Print with Examples: The print() function in Python is used to display messages on the screen. This function prints strings or objects converted to a string while displaying output.

print(object(s))


Printing strings is common in Python programming. Here’s how you can print a string using the print() function in Python 3:

print(“Welcome to moji”)

Welcome to moji

In Python 2, the same example appears as:

print “Welcome to moji”


To print multiple strings, such as country names, use separate print() statements:

print(“USA”)

print(“Canada”)

print(“Germany”)

print(“France”)

print(“Japan”)

USA

Canada

Germany

France

Japan


To print blank lines in your program, use the print() function with \n.

print(8 * “\n”)

OR

print(“\n\n\n\n\n\n\n\n”)

print(“Welcome to moji”)

print(8 * “\n”)

print(“Welcome to moji”)

 How to Create Your First Python Program

---Advertisement---

Leave a Comment