Make a Unique Tracking Number in Python Django

Make a Unique Tracking Number in Python Django

#make unique support number
Tracking_number = make_unique_support_number('12', 10)
def make_unique_support_number(id,n):

    padding=int(n)-int(len(str(id)))

    s=''

    for x in range (0, padding):

        s=s+str('0')

    return "ST-"+str(s)+str(id)

Leave a Reply

Your email address will not be published. Required fields are marked *