str=" "
while str:
str=s.readline()
print(str,end=" ")
#print(type(str))
I am getting the output correctly by this code but I am not able to understand the functioning of the code specially how the while condition is working in this case.