Having some trouble including a single pair of backslashes in the result of a formatted string in Python 3.6. Notice that #1 and #2 produce the same unwanted result, but #3 results in too many backslashes, another unwanted result.
1
t = "arst '{}' arst"
t.format(d)
>> "arst '2017-34-12' arst"
2
t = "arst \'{}\' arst"
t.format(d)
>> "arst '2017-34-12' arst"
3
t = "arst \\'{}\\' arst"
t.format(d)
>> "arst \\'2017-34-12\\' arst"
I'm looking for a final result that looks like this:
>> "arst \'2017-34-12\' arst"