input: Write a function to encrypt a message using a key in Python. The function should return the encrypted message.
  import hashlib
  
  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")=="igmnv%xsfg}"
  assert encrypt("Python", "key")=="Thxqkp"
  assert encrypt("Hello", "abc")=="Igmno"
  assert encrypt("", "anykey")==""
  assert encrypt("Test", "1")=="Uftu"
output: def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg