Skip to content

Tired of selecting and copy pasting the data from functions?

shubham87271284 profile image Shubham Rajput twitter logo ・1 min read

Often we require to print some value then select it and copy paste to different places to compare or debug, we can save some time using python's pyperclip which is very simple to use:

def copy_data_to_clipboard(string_data):
    import pyperclip
    spam = pyperclip.paste

just have this function in your code and use it whenever you need.

twitter logo DISCUSS
markdown guide
Classic DEV Post from Aug 4 '19

You're not worth hiring unless...

Shubham Rajput profile image