ee = re.findall(r'\[(.*?)\]', i)[0]
'''
The Strftime() function is used to convert date and time
objects to their string representation. It takes one or
more inputs of formatted code and returns the string
representation
'''
dt = datetime.datetime.strptime(ee, '%d/%m/%Y:%H:%M:%S').strftime('%d/%m/%Y:%H:%M:NN')
if date in diversed.keys():
d_v[date]=diversed[date]+1
# print(diversed[date])
else:
diversed[date]=1
# print("no duplicates")
print(diversed)
Try doing this