Right justify : Rjust : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Rjust »

 

Right justify


chapters = {1:52:463:524:875:90}
hexStr = "3f8"


print "Hex String: " + hexStr.upper().rjust(8,'0')
print
for x in chapters:
    print "Chapter " + str(x+ str(chapters[x]).rjust(15,'.')



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Rjust