Issue
I have copied this block of code:
def addi(a, b):
return a+b
addi(4,3)
When i use %cpaste in ipython:
It does not paste any of the lines from the copied content.
Solution
%cpaste
doesn't paste anything for you. You need to paste your code after entering a %cpaste
command, and then enter --
on a line by itself to mark the end of the pasted code. (This allows extra flexibility with things like pasting together multiple snippets, or working over a connection where IPython has no direct access to your clipboard.)
If you want a command that will grab text straight out of your clipboard for you, that's %paste
.
Answered By - user2357112 supports Monica
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.