# The pyperclip module is used to copy text to the clipboard in python. # To install it, run pip install pyperclip in your terminal. import pyperclip var = 'Hello World' pyperclip.copy(var)