pip install pyperclip
import pyperclip
pyperclip.copy("this is a test")
pyperclip.paste()
返回字符串,表示剪贴板内容。