+ 1
Help please!
What am i doing wrong!? Here's my code file = open("/usercode/files/books.txt", "r") #your code goes here list = file.readlines() for i in list: print(i[0] + str(len(i))) file.close() And here's what the output should be: H12 T16 P19 G18
4 Respuestas
+ 1
you have to strip each line
https://www.sololearn.com/discuss/2589736/?ref=app
+ 2
Include in the question description a description of the task, the problem you had and a link to your code in Code Playground. This allows us to see the problem.
Also, don't use "list" as a variable. It's a reserved class name.
0
Emerson Prado Thanks for your reply
I found the solution with a help from Slick.
So, thank you guys a lot 🤗
0
Anouar Maazaz Good. Keep the reserved words hint anyway.