# The limit of "input()" on Python ###### tags: `Python` ### On Linux: ```= import termios def get_line(prompt=""): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~termios.ICANON try: termios.tcsetattr(fd, termios.TCSADRAIN, new) line = input(prompt) finally: termios.tcsetattr(fd, termios.TCSADRAIN, old) return line s = get_line() ```