8th Dec 2022, 3:07 PM
Ankora
5 Answers
+ 2
The parentheses in the for-loop do not match. What is src()? There is no src defined. Note that you can only concentate strings, not numbers.
8th Dec 2022, 3:13 PM
Lisa
Lisa - avatar
+ 1
There is a syntax error in the code you provided. In the for loop, the print() statement is missing a closing parenthesis after len(i). Syntax error on scr, it should be str. https://code.sololearn.com/cOJXHOEW6QZs/?ref=app
8th Dec 2022, 3:27 PM
Calviղ
Calviղ - avatar
0
# Created by Ankora file = open("/usercode/files/books.txt", "r") for i in file.readlines(): print(i+str(len(i))) file.close()
8th Dec 2022, 3:18 PM
Mustafa Hato
Mustafa Hato - avatar
0
Okay, thanks I was forget to put one parentesis the scr and not str was at that time
8th Dec 2022, 7:24 PM
Ankora
0
I do this code almost 5 times
8th Dec 2022, 7:25 PM
Ankora