input: Write a python function to convert a byte array to a URL-encoded string.
  assert byte_array_to_string([72, 101, 108, 108, 111]) == 'Hello'
  assert byte_array_to_string([33, 64, 35, 36, 37]) == '%21%40%23%24%25'
  assert byte_array_to_string([65, 66, 67, 128, 129, 130]) == 'ABC%80%81%82'
output: def byte_array_to_string(byte_array):
      return ''.join(chr(b) if 32 <= b <= 126 else f'%{b:02X}' for b in byte_array)