input: 
  def encrypt(message: str, key: str) -> str:
      """Encrypts a message using a key by shifting each character in the message
      by the value of the first character of the key.
      >>> encrypt("Hello world!", "secret")
      'Tqxx{ y|{|{'
      """
      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():
                  if ord(char) + shift > ord('z'):
                      encrypted_msg += chr(ord(char) + shift - 26)
                  else:
                      encrypted_msg += chr(ord(char) + shift)
              else:
                  if ord(char) + shift > ord('Z'):
                      encrypted_msg += chr(ord(char) + shift - 26)
                  else:
                      encrypted_msg += chr(ord(char) + shift)
          else:
              encrypted_msg += char
      return encrypted_msg