---
description: In this tutorial, you will learn- How to print simple string? How to print blank lines Print end command
title: "Python Print() Statement: How to Print with Examples"
image: https://www.guru99.com/images/python-print-statement.png
---

[Skip to content](#main)

**⚡ Smart Summary**

Python print() function displays a message or object on the screen after converting it to a string. The examples below show how to print strings, blank lines, and multiple items, and how to control line endings.

- 🖨️ **Purpose:** The print() function outputs strings and objects to the screen.
- 🔤 **Syntax:** Call print(object(s)) with the value you want to display.
- 🔁 **Multiple Prints:** Each print() call outputs on its own new line by default.
- ⬜ **Blank Lines:** Use “\\n” or multiply it to print empty lines.
- ➡️ **end Parameter:** Change the line ending, for example end=’ ‘, in Python 3.
- ⚠️ **Version Note:** Python 3 uses print() as a function; Python 2 used it as a statement.

Read More

![Python Print() Statement](https://www.guru99.com/images/python-print-statement.png)

## Python print() function

The print() function in Python is used to print a specified message on the screen. The print command in Python prints strings or objects which are converted to a string while printing on a screen.

**Syntax:**

```
print(object(s))
```

## How to Print a simple String in Python?

More often then not you require to [Print strings](https://www.guru99.com/python-string-format.html) in your coding construct.

Here is how to print statement in Python 3:

### Example: 1

To print the Welcome to Guru99, use the Python print statement as follows:

```
print ("Welcome to Guru99")
```

**Output:**

Welcome to Guru99

In Python 2, same example will look like

```
print "Welcome to Guru99"
```

### Example 2:

If you want to print the name of five countries, you can write:

```
print("USA")
print("Canada")
print("Germany")
print("France")
print("Japan")
```

**Output:**

```
USA
Canada
Germany
France
Japan
```

**Don't Miss:**

- [Python Rename File and Directory using os.rename()](https://www.guru99.com/python-rename-file.html)
- [8 BEST Python Courses Online for Beginners (2026)](https://www.guru99.com/best-python-courses.html)
- [Python Escape Character Sequences (Examples)](https://www.guru99.com/python-escape-characters.html)
- [Python List sort() with Examples](https://www.guru99.com/python-list-sort.html)

## How to print blank lines

Sometimes you need to print one blank line in your Python program. Following is an example to perform this task using Python print format.

### Example:

Let us print 8 blank lines. You can type:

```
print (8 * "\n")
```

or:

```
print ("\n\n\n\n\n\n\n\n\n")
```

**Here is the code**

```
print ("Welcome to Guru99")
print (8 * "\n")
print ("Welcome to Guru99")
```

**Output**

```
Welcome to Guru99







Welcome to Guru99
```

## Print end command

By default, the print function in Python ends with a newline. This function comes with a parameter called ‘end’. The default value of this parameter is ‘\\n’, i.e., the new line character. You can end a print statement with any character or string using this parameter. This is available only in Python 3+.

**Example 1:**

```
print("Welcome to", end=' ')
print("Guru99", end='!')
```

**Output:**

Welcome to Guru99!

**Example 2:**

```
# ends the output with '@'
print("Python", end='@')
```

**Output:**

Python@

This code is editable. Click Run to Execute  

  

## FAQs

🔀 What is the difference between print in Python 2 and Python 3?

In Python 2, print was a statement written as print “text”. In Python 3, print is a function called as print(“text”) with parentheses. Python 3 is the current standard, so always use the function form.

🔗 What does the sep parameter do in the print() function?

The sep parameter sets the separator placed between multiple items in one print() call. By default it is a space. For example, print(“a”, “b”, sep=”-“) outputs a-b instead of a b.

🧩 How do you print a variable and text together in Python?

Use an f-string, such as print(f”Hello {name}”), or separate items with commas, such as print(“Hello”, name). F-strings are the modern, readable way to mix text and variables in Python 3.6 and later.

🤖 Can AI help debug Python print statements?

Yes. AI assistants can spot missing parentheses, wrong quotes, or Python 2 syntax, and explain the exact error. They also suggest cleaner ways to format output, which helps beginners fix print-related mistakes quickly.

🧠 How is print() useful when building AI programs in Python?

print() is a simple way to inspect data, model outputs, and intermediate values while building AI programs. Developers use it to trace how data flows through code, though logging libraries are preferred for larger projects.

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/python-print-statement.png","url":"https://www.guru99.com/images/python-print-statement.png","width":"700","height":"250","caption":"Python print() Statement","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/print-python-examples.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/python","name":"Python"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/print-python-examples.html","name":"Python Print() Statement: How to Print with Examples"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/print-python-examples.html#webpage","url":"https://www.guru99.com/print-python-examples.html","name":"Python Print() Statement: How to Print with Examples","dateModified":"2026-10-07T13:00:14+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/python-print-statement.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/print-python-examples.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/editorial","name":"Editorial Team","url":"https://www.guru99.com/author/editorial","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/favicon-new-logo.png","url":"https://www.guru99.com/images/favicon-new-logo.png","caption":"Editorial Team","inLanguage":"en-US"},"sameAs":["https://www.guru99.com/editorial-team"],"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Python","headline":"Python Print() Statement: How to Print with Examples","description":"In this tutorial, you will learn- How to print simple string? How to print blank lines Print end command","keywords":"python","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/editorial","name":"Editorial Team"},"dateModified":"2026-10-07T13:00:14+05:30","image":{"@id":"https://www.guru99.com/images/python-print-statement.png"},"copyrightYear":"2026","name":"Python Print() Statement: How to Print with Examples","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between print in Python 2 and Python 3?","acceptedAnswer":{"@type":"Answer","text":"In Python 2, print was a statement written as print \"text\". In Python 3, print is a function called as print(\"text\") with parentheses. Python 3 is the current standard, so always use the function form."}},{"@type":"Question","name":"What does the sep parameter do in the print() function?","acceptedAnswer":{"@type":"Answer","text":"The sep parameter sets the separator placed between multiple items in one print() call. By default it is a space. For example, print(\"a\", \"b\", sep=\"-\") outputs a-b instead of a b."}},{"@type":"Question","name":"How do you print a variable and text together in Python?","acceptedAnswer":{"@type":"Answer","text":"Use an f-string, such as print(f\"Hello {name}\"), or separate items with commas, such as print(\"Hello\", name). F-strings are the modern, readable way to mix text and variables in Python 3.6 and later."}},{"@type":"Question","name":"Can AI help debug Python print statements?","acceptedAnswer":{"@type":"Answer","text":"Yes. AI assistants can spot missing parentheses, wrong quotes, or Python 2 syntax, and explain the exact error. They also suggest cleaner ways to format output, which helps beginners fix print-related mistakes quickly."}},{"@type":"Question","name":"How is print() useful when building AI programs in Python?","acceptedAnswer":{"@type":"Answer","text":"print() is a simple way to inspect data, model outputs, and intermediate values while building AI programs. Developers use it to trace how data flows through code, though logging libraries are preferred for larger projects."}}]}],"@id":"https://www.guru99.com/print-python-examples.html#schema-1139158","isPartOf":{"@id":"https://www.guru99.com/print-python-examples.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/print-python-examples.html#webpage"}}]}
```
