<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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 pad_len < blocksize, 'padding error' 
  assert pad_len < len(str), 'padding error'
    
  return str[:-pad_len]