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

getting random gaps in my print statements python

I am trying to print a statement in python and getting gaps and missing letters, this only happens when I use "". I was trying to enter the path.
image

check the image

I am using vs code, anaconda, Jupiter notebook

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 :

The \t in your string is an escape character which translates to a tab. In order to ignore the escape characters you can use raw strings by placing an r before the string. Examples:

print("aa\tbb")
aa  bb

With raw strings:

print(r"aa\tbb")
aa\tbb
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