Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

End = "" results in % at the end

I’m a beginner who just learned Python for 3 days.
The result value of end = " " is % at the end. This problem didn’t occur until yesterday.

for i in range(10):
    print(i, end=" ")

It works normally at the terminal or idle.I also deleted the VSCode and re-installed it.
What’s the problem? I’d appreciate your help.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

That’s not really there, and it’s not coming from Python. When you run a command from zsh and the output of that command doesn’t include a trailing newline, zsh displays that inverse-video percent sign to signal to the user that the newline is missing.non-Python demo:

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading