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

8
  • 5
    Probably, there is a trailing enter right at the end in the copied data. Commented Dec 24, 2019 at 8:40
  • 1
    Didn't know that was possible, although that's true. How can i make sure that the paste is RAW always. Commented Dec 24, 2019 at 8:41
  • Please create a minimal reproducible example, what does "does not allow me to edit anything" mean? Commented Dec 24, 2019 at 8:42
  • 1
    You should not include "enter" while copying and that's the quickest solution (maybe only). Commented Dec 24, 2019 at 8: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. Commented Dec 24, 2019 at 8:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.