Cómo copiar automáticamente una salida al portapapeles en Python

import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
Dabuilda