Unable to print in the desired manner using Pyperclip Module

半腔热情 提交于 2020-01-25 10:21:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!