getting random gaps in my print statements python

Question:

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

Asked By: Pedakolimi Harish

||

Answers:

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("aatbb")
aa  bb

With raw strings:

print(r"aatbb")
aatbb
Answered By: Dan Constantinescu

Happening because in dogtrain, t is being considered as Tab escape character.
to fix it, simply put another in front of ‘t’ \t.

Answered By: Sanju Halder
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.