Center a string : center « String « Python Tutorial






string1 = "Now I am here."

print string1.center( 50 )
print string1.rjust( 50 )
print string1.ljust( 50 )








5.3.center
5.3.1.Center a string