python string copy

# 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)

Here is what the above code is Doing:
1. Importing the pyperclip module.
2. Storing a string in a variable.
3. Passing the string to the pyperclip.copy() function.

Now, when you run the program, the string ‘Hello World’ will be copied to your clipboard.