它在日志中说了这一点,我不知道为什么。当我出现故障时,它只是随机出现。
from datetime import datetime
unique_dates = ["January 12,1988","February 11,1995","December 2,1992"]
ans = []
for val in unique_dates:
objDate = datetime.strptime(val, '%B %d,%Y')
ans.append(objDate.strftime('%d/%m/%Y'))
print(unique_dates, ans)