在python中是否有更好的方法将美国日期格式转换为英国日期格式?
我正在使用以下内容:
df = ['01/31/2014', '02/06/2013']
for a in df:
s = list(a)
d = [s[3],s[4],s[2],s[0],s[1],s[5],s[6],s[7],s[8],s[9]]
f.append("".join(d))
print (f)
['31/01/2014', '06/02/2013']
Run Code Online (Sandbox Code Playgroud) python ×1