Can anybody explain me what print() does under for loop (last second line) | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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
0 Réponse