pc.display reads and changes the desktop’s resolution.
print(pc.display.size)                    # {"width": 1920, "height": 1080}
pc.display.set_size(1280, 800)

display.modes()

The resolutions set_size() can switch to. Returns list[dict], each {"width", "height"}. The modes are 1024x768, 1280x720, 1280x800, 1280x1024, 1366x768, 1440x900, 1536x864, 1600x900, 1680x1050, 1920x1080, 1920x1200 and 2560x1440.

display.size

The current resolution. Returns {"width": int, "height": int}.

display.set_size()

Switch the desktop to one of its modes. The live view and the recording follow the new size; a live view pauses for 1 to 3 seconds while its stream restarts.
display.set_size(width, height)
Returns the new size. Raises InvalidArgsError, listing the modes, for a size that isn’t one.