write a program that reads in a text file, infile.txt, and prints out all the lines in the file to the screen until it e
Posted: Sat May 14, 2022 7:35 pm
write a program that reads in a text file, infile.txt, and prints out all the lines in the file to the screen until it encounters a line with fewer than & characters. Once it finds a shortline fone with fewer than 4 characters), the program stops. That short line is not printed. Your programmustuse tua) to read one line at a time, Remember that a newline is a character too For your testing you should create a file named infile.Dr. Only upload your Python program, wit create my own intet, Your loop should be controlled by a loop that uses a condition involving either or Please use a while-loop but do not use benak. Also only have ONE condition in your solution do NOT have it anotheCondition inside your loop Hint: Determine the length of the first line of the file before the loop. The length of the second and subsequent should be examined inside the body of the loop. You could also look at the first few programs that Zelle covers dealing with white