Write a program that reads in a text file, infile.txt, andprints out all the lines in the file to the screen until itencounters a line with fewer than 4 characters. Once it finds ashort line (one with fewer than 4 characters), the program stops.For your testing you should create a file named infile.txt. Onlyupload your Python program, I will create my own infile.txt. Pleaseuse a while-loop BUT do not use break or Quit.
Expert Answer
Answer to 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 …