I definitely don’t know your question. IMO, you need a method to read text based on a string (including some special character) from the console to the program.
No matter what method you use, if this symbol has special meaning in different consoles, you should encounter a console (not only for a specific system, but also for a specific console), all text in the console will be stored in the buffer first, and then show on the screen, finally process and send to your program. Another way around this problem is to use the environment to create the source string.
You can add a special method (decorator) to decorate the raw_input () method or multiple inputs to process a special word.
After resolving this issue
using this fragment can work with input:
def pre(): textline=raw_input()
To be faster, perhaps to call some kind of system function, depending on the OS, is an idea. But in fact, IO in python is faster for regular tasks.
source share