You can download this code by clicking the button below.
This code is now available for download.
This function returns a right-justified version of the string, filled with the specified fill character on the left if necessary.
Technology Stack : string.zfill(width)
Code Type : String processing
Code Difficulty : Beginner
def zfill(string, width=0, fillchar=' '):
"""
This function returns a right-justified version of the string, filled with the specified
fill character on the left if necessary.
"""
return string.zfill(width)