question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't show multiple prints on the same line in Python

See original GitHub issue

Environment data

  • VS Code version: 1.61.2
  • Jupyter Extension version (available under the Extensions sidebar): v2021.9.1101343141
  • Python Extension version (available under the Extensions sidebar): v2021.10.1365161279
  • OS (Windows | Mac | Linux distro) and version: Windows 10
  • Python and/or Anaconda version: 3.9.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Jupyter server running: Local

Expected behaviour

image

Actual behaviour

image

Code Sample :

import time 
for i in range(10):
    s = str(i) + "%"
    print("{0}\r".format(s),end="")
    time.sleep(0.2)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Dec 2, 2021

Please try vscode insiders. You’ll get 2021.11.xxxx

1reaction
DonJayamannecommented, Oct 31, 2021

Thanks for reporting this issue.
I’ll look into this during the week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

multiple prints on the same line in Python - Stack Overflow
Show activity on this post. Python appends newline as an end to print. Use end=' ' for python3 for print method to append...
Read more >
Python How to Print on the Same Line - codingem.com
To print on the same line in Python, add a second argument, end=' ', to the print() function. For example, print("Hello world!", end='...
Read more >
How to print on the same line in Python – with example
The print function displays things on the standard output, then ends in a new line. In this article, we'll show you how to...
Read more >
Python: How to Print Without Newline? - STechies
Whenever you need an output printed in the same line, all you need to do is to terminate your print function with the...
Read more >
Python List Print - 7 Different Ways to Print a List You Must Know
Did you know there's more than one way to print a list in Python? ... some neat formatting tricks such as printing a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found