def append_pkcs7_padding(s):
    """
    Function to return s padded to a multiple of 16-bytes by PKCS7 padding.
    :param s: string to apply padding to
    :return: padded string
    """

    # 
    numpads = 16 - (len(s) % 16)
    return s + numpads * chr(numpads)