2
>>>import pyperclip  
>>>pyperclip.paste()  
' '  
>>>pyperclip.copy('Hello World!')  
>>>pyperclip.paste()  
u'Hello World!'  

 
>>>pyperclip.copy('text')  
>>>pyperclip.paste()  
u'text'  

Every time I use the paste function it prints a u before my string. When I opened the idle I started with the paste function and it pasted empty '', but as soon as I add any text to the string, the paste function prints a u'And then my sting here'.

martineau
  • 119,623
  • 25
  • 170
  • 301
Charlie
  • 31
  • 2
  • 5
    That's just telling you that the string is a Unicode string (and furthermore, that you're using an obsolete Python 2.x version, as Unicode strings became the default in 3.x). The `u` isn't actually part of the string. – jasonharper Oct 07 '20 at 19:45

0 Answers0