问题
I am using python 2.7.13. I am using Pyperclip Module to copy/paste text on a notepad (just for experimentation).
This is what I am trying to do: a=['ayush','gupta'] pyperclip.copy('\n'.join(a)) #It should print ayush and gupta in separate lines. But I am getting output as: ayushgupta on the notepad.
If I try: pyperclip.copy(' '.join(a)) #It works fine. I get ayush gupta with a space.
Could anyone please explain this.Thanks!!!
来源:https://stackoverflow.com/questions/45714293/unable-to-print-in-the-desired-manner-using-pyperclip-module