how to paste in a txt in python

Viewed 129

I'm trying to paste in a txt block but I always get an error no matter how hard I try

the copy part is already resolved but pasting in a txt not yet

import pyperclip

with open('conta.txt', 'w+') as f:
    conteudo = f.write()
    pyperclip.paste(str(conteudo))
1 Answers

Think it's more like this:

import pyperclip

with open('conta.txt', 'w+') as f:
    f.write( pyperclip.paste() )
Related