input: Write a function to encrypt a message using a key in Python. The function should take in a string message and a string key as input, and return an encrypted version of the message where each character in the message is shifted by the ASCII value of the first character of the key. 
  
  def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg
  
  
  assert encrypt("Hello world!", "secret")=="Tkkn`xqy^txk"
  assert encrypt("Python", "program")=="[`vfgsv"
  assert encrypt("Testing", "key")=="Tk|xyjy"
  assert encrypt("", "key")==""
  assert encrypt("Encrypted!", "123456")=="Ernc{oeib#"
output: def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg