input: Write a python function to compress and decompress a string.
  assert compress('aaabccddd') == [['a', '3'], ['b', '1'], ['c', '2'], ['d', '3']]
  assert decompress([['a', '3'], ['b', '1'], ['c', '2'], ['d', '3']]) == 'aaabccddd'
  assert compress('') == []
  assert decompress([]) == ''
  assert compress('abcd') == [['a', '1'], ['b', '1'], ['c', '1'], ['d', '1']]
  assert decompress([['a', '1'], ['b', '1'], ['c', '1'], ['d', '1']]) == 'abcd'
output: def compress(s):
      if not s:
          return []
      result = []
      count = 1
      current_char = s[0]
      for i in range(1, len(s)):
          if s[i] == current_char:
              count += 1
          else:
              result.append([current_char, str(count)])
              current_char = s[i]
              count = 1
      result.append([current_char, str(count)])
      return result
  
  def decompress(lst):
      result = []
      for char, count in lst:
          result.append(char * int(count))
      return ''.join(result)