I am trying to convert the following list of strings :
['0:00:01.138000', '0:00:03.733000', '0:00:01.250000', '0:00:01.127000']
But when I try the following code :
T = '%H:%M:%S.%f'
for i in range(len(Normal_key)):
try:
Normal_key[i]=datetime.strptime(Normal_key[i], T)
except ValueError:
continue
print(Normal_key)
The list now contains data information for some reason even though no date was specified:
[datetime.datetime(1900, 1, 1, 0, 0, 1, 138000), datetime.datetime(1900, 1, 1, 0, 0, 3, 733000), datetime.datetime(1900, 1, 1, 0, 0, 1, 250000)]