+ 8
Help me ,i am getting unexpected output in this code[SOLVED]
7 Antworten
+ 5
The last line doesn't end in "\n".
+ 4
Såñtösh ,it only solves the item at the end of the array. the end= " "
+ 3
I -_- D ,when you use the readlines() it outputs
["Harry Potter /n", "The Hunger Games /n", "Pride and Prejudice/n", "Gone With The Wind",]
+ 2
print(words[0] + str(len(words) -1),end=" ")
use end=" "
+ 1
how does the file itself look?
0
Davcod okay so like they said above.
the last line doesn't has a \n character. that's why the unexpected output.
if you add it it should be alright.
let me know after you add it.
0
Davcod I also see that some lines has a space before the new line character and some doesn't.