No, you cannot. The print statement is gone in Python 3; the compiler doesn't support it anymore.

You can make print() work like a function in Python 2; put this at the top of every module that uses print:

from __future__ import print_function

This will remove support for the print statement in Python 2 just like it is gone in Python 3, and you can use the print() function that ships with Python 2.

six can only help bridge code written with both Python 2 and 3 in mind; that includes replacing print statements with print() functions first.

You probably want to read the Porting Python 2 Code to Python 3 howto; it'll tell you about more such from __future__ imports as well, as well as introduce tools such as Modernize and Futurize that can help automate fixing Python 2 code to work on both Python 2 and 3.

Answer from Martijn Pieters on Stack Overflow
🌐
Mimo
mimo.org › glossary › python › print-function
Explore Python's print() function, master output customization
The simplest usage of the print() function involves outputting a str or text string to the console: ... Python 3 introduced several improvements to the print() function compared to earlier versions, making it more versatile.
🌐
W3Schools
w3schools.com › python › ref_func_print.asp
Python print() Function
Python Examples Python Compiler ... Plan Python Interview Q&A Python Training ... The print() function prints the specified message to the screen, or other standard output device....
🌐
Python documentation
docs.python.org › 3 › whatsnew › 3.0.html
What’s New In Python 3.0
The print() function doesn’t support the “softspace” feature of the old print statement. For example, in Python 2.x, print "A\n", "B" would write "A\nB\n"; but in Python 3.0, print("A\n", "B") writes "A\n B\n".
🌐
Python documentation
docs.python.org › 3 › tutorial › inputoutput.html
7. Input and output — Python 3.15.0 documentation
So far we’ve encountered two ways of writing values: expression statements and the print() function. (A third way is using the write() method of file objects; the standard output file can be referenced as sys.stdout. See the Library Reference for more information on this.)
🌐
EDUCBA
educba.com › home › software development › software development tutorials › python 3 tutorial › python 3 print
Python 3 print | Definition | Overviews | Parameters | Function
March 30, 2023 - ... print (function) (value(s), ... parameter), flush=flush (optional parameter)) The print method in Python accepts any number of parameters and prints them on a single line of text....
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Snarky
snarky.ca › why-print-became-a-function-in-python-3
Why `print` became a function in Python 3
August 20, 2018 - In the case of print, the difference between print A and print(A) is negligible and thus there is no loss in readability. And since we were able to completely replace print with a function there was no loss in functionality, hence why we reduced the amount of syntax in Python 3 by making print a function (along with removing a bunch of other bits of syntax).
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-output-using-print-function
Python - Print Output using print() function - GeeksforGeeks
In this example, we have 2 variables integer and string. We are printing all variables with print() function. ... You can pass variables, strings, numbers, or other data types as one or more parameters when using the print() function.
Published: July 11, 2025
🌐
Real Python
realpython.com › python-print
Your Guide to the Python print() Function – Real Python
July 3, 2026 - In the previous section, you learned that print() delegates printing to a file-like object such as sys.stdout. Some streams, however, buffer certain I/O operations to enhance performance, which can get in the way. Take a look at an example. Imagine you’re writing a countdown timer, which should append the remaining time to the same line every second: ... import time num_seconds = 3 for countdown in reversed(range(num_seconds + 1)): if countdown > 0: print(countdown, end="...") time.sleep(1) else: print("Go!")
Find elsewhere
🌐
Guru99
guru99.com › home › python › python print() statement: how to print with examples
Python Print() Statement: How to Print with Examples
July 10, 2026 - In Python 2, print was a statement written as print “text”. In Python 3, print is a function called as print(“text”) with parentheses.
Top answer
1 of 5
21

No, you cannot. The print statement is gone in Python 3; the compiler doesn't support it anymore.

You can make print() work like a function in Python 2; put this at the top of every module that uses print:

from __future__ import print_function

This will remove support for the print statement in Python 2 just like it is gone in Python 3, and you can use the print() function that ships with Python 2.

six can only help bridge code written with both Python 2 and 3 in mind; that includes replacing print statements with print() functions first.

You probably want to read the Porting Python 2 Code to Python 3 howto; it'll tell you about more such from __future__ imports as well, as well as introduce tools such as Modernize and Futurize that can help automate fixing Python 2 code to work on both Python 2 and 3.

2 of 5
10

You can use the tool 2to3 is an Automated Python 2 to 3 code translation, as @Martijn Pieters♦ told :), you can get over a ride throw the old python and making the changes work into python 3, I make a simple example like this:

I created this file, python2.py:

#!python3

print 5

when I run it with python it obviously shows:

line 3
    print 5          ^
SyntaxError: Missing parentheses in call to 'print'

so, you can transform it via terminal like this:

This is the important comand

$ 2to3 -w home/path_to_file/python2.py

-w parameter will write the file, if you want only see the future changes without apply them, just run it without -w. after run it it will show something like

root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
RefactoringTool: Refactored Desktop/stackoverflow/goto.py
--- Desktop/stackoverflow/goto.py   (original)
+++ Desktop/stackoverflow/goto.py   (refactored)
@@ -1,3 +1,3 @@
 #!python3

-print 5
+print(5)
RefactoringTool: Files that were modified:

And the file will look like:

#!python3

print(5)
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-print.html
print() and Standard Out
The Python print() function takes in any number of parameters, and prints them out on one line of text. The items are each converted to text form, separated by spaces, and there is a single '\n' at the end (the "newline" char). When called with zero parameters, print() just prints the '\n' ...
🌐
w3resource
w3resource.com › python › python-print-statement.php
Python print() function
The print() function is a fundamental part of Python that allows for easy console output. The function has replaced the older print statement in Python 3, providing more versatility with keyword arguments.
🌐
Scaler
scaler.com › home › topics › print() in python
Python print() Function - Scaler Topics
June 29, 2022 - In Python 2, print is a statement and does not require parentheses. However, in Python 3, print() is a function and requires parentheses around its arguments.
🌐
Note.nkmk.me
note.nkmk.me › home › python
How to Use print() in Python | note.nkmk.me
May 10, 2023 - Unless you're familiar with the C-style printf, which uses conversion specifiers like %d, %f.2, and %s, it's recommended to use the format() method or f-strings, as mentioned in the official documentation. Note that f-strings were added in Python 3.6 and are not available in earlier versions.
🌐
Upgrad
upgrad.com › home › tutorials › software & tech › print in python
Python Print() Function: An Ultimate Tutorial with Examples | upGrad
October 17, 2024 - The Python print format signifies the manner in which you show output utilizing the print() function. It comprises formatting the data you wish to print to a file or the console in a readable and structured manner. In contrast to Python 2, which did not need to apply parentheses, Python 3 needs parentheses to be applied, or it will display a syntax error.
🌐
Software Testing Help
softwaretestinghelp.com › home › python › complete guide to python print() function with examples
Complete Guide To Python print() Function With Examples
April 1, 2025 - In Python3 “ print ” became a function and it needs parentheses. ... The output will be “ 4 6 ” and “ print 2, 3 ” will drop a syntax error as it is a function and needs the parentheses.
🌐
Snakify
snakify.org › input, print and numbers
Input, print and numbers - Learn Python 3 - Snakify
For instance, if the two variables "first" and "second" are pointing to the objects of type int, Python can multiply them. However, if they are pointing to the objects of type str, Python can't do that: ... first = 5 second = 7 print(first * second) # you can use single or double quotes to define a string first = '5' second = "7" print(first * second)
🌐
Real Python
realpython.com › courses › python-print
The Python print() Function: Go Beyond the Basics – Real Python
August 25, 2026 - Note: print() was a major addition to Python 3, in which it replaced the old print statement available in Python 2.