2

Title really seems off the point, but what I am trying to ask is this:

For example, I have an input variable called answer

answ = input("> ")

Whenever I run the code and paste something into the input it automatically goes through and does not allow me to edit anything.

But, I also have another input variable that is not really different from the first one and that one allows me to edit out my input once I paste anything into

My question is, why are those 2 inputs different.

Please ask me in detail on what you didn't get about my question. I might be explaining very poorly

sani bani
  • 83
  • 1
  • 7
  • 4
    Probably, there is a trailing enter right at the end in the copied data. – Austin Dec 24 '19 at 08:40
  • 1
    Didn't know that was possible, although that's true. How can i make sure that the paste is RAW always. – sani bani Dec 24 '19 at 08:41
  • Please create a [mcve], what does "does not allow me to edit anything" mean? – Sayse Dec 24 '19 at 08:42
  • 1
    You should not include "enter" while copying and that's the quickest solution (maybe only). – Austin Dec 24 '19 at 08:45
  • 1
    There is no way to remove the enter from the pasted text if one is present. You could put your input into a loop that prints the text back and asks 'Is that really your input?' - but that is clumsy and awkward. Copying without enter in it is the way to go. – Patrick Artner Dec 24 '19 at 08:47
  • @Sayse https://i.imgur.com/WcXpcJz.gif In this GIF example you can see that I did not press enter and it automatically made an input for me – sani bani Dec 24 '19 at 08:49
  • [How to paste multiple lines of text into python input](https://stackoverflow.com/q/34889012/1324033) – Sayse Dec 24 '19 at 08:57
  • ctrl+shift + (C or V) – Wonka Dec 24 '19 at 09:17

0 Answers0