0

Book title python

Anyone know why i dont get the last one?how can i make the last one not minus 1 ? https://code.sololearn.com/currvnTSiDhm/?ref=app

9th Aug 2021, 11:15 AM
aazizul zainal
aazizul zainal - avatar
3 Antworten
9th Aug 2021, 11:18 AM
Slick
Slick - avatar
+ 2
aazizul zainal This also works: for x in file.read().split("\n"): print(f"{x[0]}{len(x)}")
10th Aug 2021, 6:30 AM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Thankss i just miss the strip()... https://code.sololearn.com/cFnVFh8BHVxJ/?ref=app My new updated ;)
9th Aug 2021, 5:55 PM
aazizul zainal
aazizul zainal - avatar