[Solved] I cant relocate or reverse string python [closed]


Using datetime function

from datetime import datetime
date = "12-01-2011"
datetimeobject = datetime.strptime(date,'%d-%m-%Y')
newformat = datetime.strftime(datetimeobject,'%Y-%m-%d')
print(newformat)

0

solved I cant relocate or reverse string python [closed]