python get the screen resolution code example
Example 1: get screen size python
>>> import pyautogui
>>> width, height= pyautogui.size()
>>> print(width)
1366
>>> print(height)
768
Example 2: python get screen size
from win32api import GetSystemMetrics
print("Width =", GetSystemMetrics(0))
print("Height =", GetSystemMetrics(1))