input: Write a function to encrypt a message using a key in Python. The function should take two inputs, the message and the key, and return the encrypted message by adding the ASCII value of the first character of the key to the ASCII value of each character in the message. If the key is empty, the function should return the original message.
  assert encrypt("Hello world!", "secret")=="fmm[c~qtn&|"
  assert encrypt("Hello world!", "key")=="Ng]rc}zxR'="
  assert encrypt("Hello world!", "")=="Hello world!"
output: def encrypt(message, key):
      if not key:
          return message
      key_ascii = ord(key[0])
      encrypted_message = ''.join(chr(ord(char) + key_ascii) for char in message)
      return encrypted_message