It's called the carriage return, or \r

Use

print i/len(some_list)*100," percent complete         \r",

The comma prevents print from adding a newline. (and the spaces will keep the line clear from prior output)

Also, don't forget to terminate with a print "" to get at least a finalizing newline!

Answer from mvds on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › how do i print on the same line?
r/learnpython on Reddit: How do I print on the same line?
January 11, 2025 -

When I write print function in different lines it also prints the values in different lines. It's surprising for me as I am coming here from C language, and it prints in the same line rather than the next one.Any Idea on how can I print in the same line.

Discussions

Pythonic way of printing multi-line strings
Hello all, I’m looking to find out what is the proper, pythonic way of printing multi-line strings, for example a message for a programs user. The issue I’ve come across concerns indentation; when print() is nested inside a statement such as an if-then or try-except, the call to print() ... More on discuss.python.org
🌐 discuss.python.org
7
0
October 4, 2022
python - How can I print multiple things on the same line, one at a time? - Stack Overflow
I want to run a script, which basically shows an output like this: Installing XXX... [DONE] Currently, I print Installing XXX... first and then I print [DONE]. How can I instead print More on stackoverflow.com
🌐 stackoverflow.com
How do I print on the same line?
Check out: https://www.w3schools.com/python/ref_func_print.asp Note the "end" argument. Pass that argument set to " " (space). More on reddit.com
🌐 r/learnpython
20
9
January 11, 2025
Printing on the same line?
If you are using python 2, then you can add a comma after the print function like this: for i in range(10): print i, # <- notice the comma at the end will output: 0 1 2 3 4 5 6 7 8 9 In python 3, print is now a function and will take an argument, called end like this: print(i, end = " ") More on reddit.com
🌐 r/learnpython
7
2
September 14, 2015
🌐
W3Schools
w3schools.com › PYTHON › python_output.asp
Python Output Values / Print Text
You can use either " double quotes ... with a new line. If you want to print multiple words on the same line, you can use the end parameter:...
🌐
DataCamp
datacamp.com › tutorial › python-print-without-new-line
Python Print Without New Line: What You Need to Know | DataCamp
August 22, 2024 - In Python version 3, you should include the end parameter in each print() function call to print without adding a new line. If you set the end parameter to an empty string, the output continues on the same line, as shown in the example below.
🌐
YouTube
youtube.com › shorts › ekMSbHiMPfI
How To Print On The Same Line In Python - YouTube
In this python tutorial, I show you how to print on the same line in python! Let's get coding!======== Ask Case Digital ========If you have a question you wo...
Published: October 26, 2024
🌐
GeeksforGeeks
geeksforgeeks.org › python › print-without-newline-python
How to Print without newline in Python? - GeeksforGeeks
To print without a newline, you can use the end parameter in the print() function and set it to an empty string or a space, depending on your needs. This allows you to print on the same line.
Published: April 26, 2025
Find elsewhere
🌐
CodeChef
codechef.com › learn › course › python › LTCPY02 › problems › PYTH08
Outputs on the same line in Python Programming
Test your Learn Python Programming knowledge with our Outputs on the same line practice problem. Dive into the world of python challenges at CodeChef.
🌐
Replit
replit.com › home › discover › how to print on the same line in python
How to print on the same line in Python | Replit
April 14, 2026 - By adding flush=True to the print() function, you force Python to write the output to the console immediately instead of holding it in a buffer. This ensures your text appears in real-time, which is essential for creating smooth animations. You'll want to use this parameter whenever you're creating dynamic, same-line updates inside a loop.
🌐
Python.org
discuss.python.org › python help
Pythonic way of printing multi-line strings - Python Help - Discussions on Python.org
October 4, 2022 - Hello all, I’m looking to find out what is the proper, pythonic way of printing multi-line strings, for example a message for a programs user. The issue I’ve come across concerns indentation; when print() is nested inside a statement such as an if-then or try-except, the call to print() ...
🌐
Scaler
scaler.com › home › topics › how to print in same line in python?
How to Print in Same Line in Python? - Scaler Topics
May 4, 2023 - ... Elevate your coding career ... tailored to address any gaps in your knowledge. To print in the same line, use the "end" parameter in the print() function and set it to an empty string....
🌐
freeCodeCamp
freecodecamp.org › news › python-print-without-new-line-print-on-the-same-line
Python Print Without New Line – Print on the Same Line
March 10, 2022 - Finally the blank line gets added due to print function's behavior as discussed in the last section. Let's say we want to remove these. To do that, we can make some changes. For this, we need to change the default behavior of print. We'll see how to do that in detail in the coming sections. Let's customize the value of end in the print function. We'll set it to ' ' which is a space. ... # Customizing the value of 'end' print("This is string 1 same line", end=' ') print("This is string 2 different line")
🌐
The Renegade Coder
therenegadecoder.com › code › how-to-print-on-the-same-line-in-python
How to Print on the Same Line in Python: Print and Write – The Renegade Coder
May 24, 2020 - In short, there are two main ways to print on the same line in Python. For Python 2, use the following print syntax: print "Williamson",. For Python 3, use the following print syntax: print("Providence", end="").
🌐
Mimo
mimo.org › glossary › python › print-function
Explore Python's print() function, master output customization
By default, the print() function's console output ends with a new line. To print to the console without adding a newline, you can set the end parameter to an empty string. By printing without a newline in Python, you can create continuous console output on the same line.
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-print-in-same-line-in-python
How to print in same line in Python?
March 25, 2026 - Use the end parameter in print() to control line breaks. Set end=" " for space-separated output or end="" for continuous printing on the same line.
🌐
www.game-u.com
game-u.com › news-and-blog › python-print-new-line
Python Print New Line: Easy Ways Add Line Breaks in Python
May 25, 2026 - Instead, you control new lines with \n or by calling multiple print() statements. In Python, \n is an escape character that tells the interpreter to move the output to a new line.
🌐
ITNEXT
itnext.io › overwrite-previously-printed-lines-4218a9563527
Overwrite Previously Printed Lines | by Thijmen Dam | ITNEXT
February 28, 2022 - Print another line, but because the cursor is now at the beginning of the previous line, the new output will be printed on top of the previous line. By default, Python’s print statement ends each string that is passed into the function with a newline character, \n.
🌐
LinkedIn
linkedin.com › pulse › python-program-print-over-same-line-lenin-mishra-
Python program to print over the same line
August 23, 2021 - However, if you want to print over and over the same line in Python, you have to use the carriage return \r symbol with the end argument. ... Even though the first 2 print statements are executed, the carriage return makes the next stdout line ...
🌐
freeCodeCamp
freecodecamp.org › news › python-new-line-and-how-to-python-print-without-a-newline
Python New Line and How to Python Print Without a Newline
June 20, 2020 - But if you use several print statements ... of the end parameter of the print function. ... A space will be added to the end of the string instead of the new line character \n, so the output of the two print statements will be displayed ...
🌐
Instagram
instagram.com › popular › how-to-print-in-same-line-in-python
How To Print In Same Line In Python
March 31, 2026 - Welcome back to Instagram. Sign in to see what your friends, family and interests have been capturing and sharing around the world.