Working on a python project where I need to copy a string to the clipboard for the user to use on other applications based on inputs. Right now I have the following:
os.system(f"echo {phrase}| clip")
for now it works fine within the python console, but whenever I do a ctrl+v/right-click+paste function it will paste the {phrase} but also include a new line right below it which throws off the other applications.
I've tried using str.strip() and str.rstrip() on {phrase} but it doesn't make a difference. Any help would be appreciated.