How does the following while loop code work?
fileinp=open(‘mar.txt’.’r’) while str: str=fileinp.readline() print(str) fileinp.close() How does the while loop in this code work and what does while str: mean? python file-handling readline New contributor vishnu is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 3
How does the following while loop code works
fileinp=open(‘mar.txt’.’r’)
while str:
str=fileinp.readline()