import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
spam = pyperclip.paste()
