How can I convert time_1
into time_2
?
>>> time_1 = '2019-01-01T00:00:00-06:00'
>>> time_2 = ???
>>> print(time_2)
"'2019-01-01T00:00:00-06:00'"
I have tried the following, but it gives the wrong output:
>>> time_1 = '2019-01-01T00:00:00-06:00'
>>> time_2 = "'" + time_1 + "'"
>>> print(time_2)
'2019-01-01T00:00:00-06:00'
Which is how time_1
looks like, not how time_2
should look like.
I know that when I go to print time_2
, its output looks like time_1
, but that's the point of this question - I want the printed output to look like time_2
.