I have some Python code that produces a list like this:
[(('infection',), 548), (('data',), 543), (('plant',), 514), (('host',), 513), (('species',), 489)]
I want the code to copy this list to my clipboard in that exact format i.e, the same as if I was to print the list.
However, the packages I have found i.e. clipboard, pyperclip do NOT allow lists to be copied.
I can join the list into a string, but then I lose the brackets and commas etc (or its a faff to add them back in).
Is there a package or a nifty bit of code that can copy LISTS to the clipboard?
Many thanks