code: def GetConsoleTitle() -> str:
      
      arrayType = ctypes.c_wchar * MAX_PATH
      values = arrayType()
      ctypes.windll.kernel32.GetConsoleTitleW(values, MAX_PATH)
      return values.value
docs: GetConsoleTitle from Win32.
      Return str.