小编ben*_*986的帖子

将美国日期转换为英国

在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

0
推荐指数
1
解决办法
7000
查看次数

标签 统计

python ×1