input: 
  def encrypt(message: str, key: str) -> str:
      """ Encrypts the given message using the provided key by shifting each character
      in the message by the corresponding character's ordinal in the key.
      >>> encrypt("Hello world!", "secret")
      "‡ŠŠŠŽƒŽ•‰"
      """
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg
  
output:     encrypted_msg = ""
      key_length = len(key)
      for i, char in enumerate(message):
          encrypted_msg += chr(ord(char) + ord(key[i % key_length]))
      return encrypted_msg