I want to write simple lambda or function that takes a string, changes to lowercase except for the first case and copies the result to clipboard in Linux.
I have lambda:
to_lower = lambda s : s[0].upper() + s[1:].lower()
This is ok:
to_lower("some Sentence with Incorrect Size of characterS")
Some sentence with incorrect size of characters
But how I copy the result of this lambda to clipboard automatically, so that I can paste it into a text editor. At the moment, I have to manually select text in python command line to copy to clipboard.