According to the docs, strip([chars])
:
Return a copy of the string with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be removed.
So, "
won't be replaced from dat: "13/08/08
and will be replaced from tim: 12:05:51+22"
because here "
is at the end:
>>> dat = 'dat: "13/08/08'
>>> tim = 'tim: 12:05:51+22"'
>>> dat.strip('"')
'dat: "13/08/08'
>>> tim.strip('"')
'tim: 12:05:51+22'
Use replace() instead:
>>> dat.replace('"', '')
'dat: 13/08/08'
>>> tim.replace('"', '')
'tim: 12:05:51+22'