input: Write a python function to encrypt and decrypt a string using a given key.
  assert encrypt_string("Hello, world!", 7) == 'Olssv3%~vysp&'
  assert decrypt_string('Olssv3%~vysp&', 7) == "Hello, world!"
  assert encrypt_string("Python", 3) == 'Sbwkrq'
  assert decrypt_string('Sbwkrq', 3) == "Python"
  assert encrypt_string("Test123", 5) == 'Yjxy678'
  assert decrypt_string('Yjxy678', 5) == "Test123"
output: def encrypt_string(text, key):
      encrypted = []
      for char in text:
          encrypted.append(chr(ord(char) + key))
      return ''.join(encrypted)
  
  def decrypt_string(encrypted_text, key):
      decrypted = []
      for char in encrypted_text:
          decrypted.append(chr(ord(char) - key))
      return ''.join(decrypted)