I have this loop that reads lines from stdin until a newline is entered, however, this only works from typing in the input. How do I get the program to read lines from a redirec
Consider the following option
import sys sys.stdin = open("input.txt", "r")