Método de formato Python Centro alinhado

print("{:^thenumberofchractersinthisline}".format("the string"))
Pleasant Pony