input: from typing import List
  
  def encrypt(message: str, key: str) -> str:
      """ Encrypts a message using a key by shifting each character in the message 
      by the Unicode value of the first character of the key.
      >>> encrypt("Hello world!", "secret")
      'Tqxx{,|svpb!'
      """
output:     shift = ord(key[0])
      encrypted_message = ""
      for char in message:
          if char.isalpha():
              base = ord('A') if char.isupper() else ord('a')
              encrypted_message += chr((ord(char) - base + shift) % 26 + base)
          else:
              encrypted_message += char
      return encrypted_message