0

Can anybody explain me what print() does under for loop (last second line)

#QUESTION IS WRITE A PROGRAM TO READ A TEXT LINE BY LINE AND DISPLAY EACH WORD SEPARATED BY A "#" myfile = open("Answer.txt", "r") line = "" while line: line = myfile.readline() for word in line.split(): print (word, end = '#') print() myfile.close()

24th Sep 2021, 2:21 PM
Uditya Kumar
Uditya Kumar - avatar
1 Réponse