input: Write a function to encrypt a message using a key in Python. The function should take two arguments: a message string and a key string. It should encrypt the message by shifting each character in the message by the ASCII value of the first character of the key. The function should return the encrypted message string.
  
  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")=="Tq$$$%wtri&"
  assert encrypt("Python", "key")=="[s{wr{"
  assert encrypt("", "secret")==""
  assert encrypt("Encrypt this!", "password")=="Jy}gxfn$ymi&"
  assert encrypt("Test", "a")=="Uftu"
output: def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg