@OP,不需要太多的字符串操作。
>>> t=time.strftime('%m/%d/%Y',time.strptime('12/1/2009', '%m/%d/%Y'))>>> '/'.join( map( str, map(int,t.split("/")) ) )'12/1/2009'
@OP,不需要太多的字符串操作。
>>> t=time.strftime('%m/%d/%Y',time.strptime('12/1/2009', '%m/%d/%Y'))>>> '/'.join( map( str, map(int,t.split("/")) ) )'12/1/2009'