input: from typing import List
  
  def encrypt(message: str, key: str) -> str:
      """Encrypt a message using a key by shifting each character of the message by the ASCII value of the first character in the key.
      >>> encrypt("Hello world!", "secret")
      'Tq$$$%twqi&'
      """
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg
output:     encrypted_msg = ""
      for char in message:
          if char.isalpha():
              shift = ord(key[0]) % 26
              if char.islower():
                  new_char = chr((ord(char) - ord('a') + shift) % 26 + ord('a'))
              else:
                  new_char = chr((ord(char) - ord('A') + shift) % 26 + ord('A'))
          else:
              new_char = chr(ord(char) + ord(key[0]))
          encrypted_msg += new_char
      return encrypted_msg