Re-run previously entered command as root user.
python
sudo !!
!!is automatically substituted to the content of the previous command. Turning the above line intosudo <your command here>.
Create GUI Applications with Python & Qt5 by Martin Fitzpatrick
(PyQt5 Edition) The hands-on guide to making apps with Python — Over 15,000 copies sold!