Left justify : ljust « String « Python Tutorial






hexStr = "3f8"


print "\nHex String: " + hexStr.upper().ljust(8,'0')








5.14.ljust
5.14.1.Introducing ljust
5.14.2.Left justify