Write a program thatreads in a text file, infile.txt, and prints out all the lines inthe file to the screen until it encounters a line with fewer than 4characters. Once it finds a short line (one with fewer than 4characters), the program stops.
For your testing youshould create a file named infile.txt. Only upload yourPython program, I will create my own infile.txt.
Please use awhile-loop BUT do not use break .
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 e…