You can download this code by clicking the button below.
This code is now available for download.
Right-aligns the string arg1 by padding it with zeros on the left until it reaches the specified length arg2.
Technology Stack : String (zfill)
Code Type : String operation
Code Difficulty : Intermediate
def zfill_string(arg1, arg2):
"""
Right-aligns the string arg1 by padding it with zeros on the left until it reaches the specified length arg2.
"""
return arg1.zfill(arg2)