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