You can take a screenshot for your windows, linux or ,mac os using this python code.
The first step before using this code . You need to install pyautogui .
- pip install pyautogui
After installing the required module, you can easily execute the python code using required IDE such as Visual studio code, Sublime text, Pycharm or any editor.