Python -Formatmethode Align Center

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