def removeRandomLenPadding(str, blocksize=AES_blocksize):
  'ISO 10126 Padding (withdrawn, 2007): Remove Padding with random bytes + last byte equal to the number of padding bytes'
  pad_len = ord(str[-1]) # last byte contains number of padding bytes
  assert pad_len < blocksize, 'padding error' 
  assert len(str) < pad_len, 'padding error'
    
  return str[:-pad_len]
dataset/ETHPy150Open keenlabs/KeenClient-Python/keen/Padding.py/removeRandomLenPadding/swapped operands of `<`