0
Why this code output error?
5 odpowiedzi
+ 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.
+ 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
0
# Created by Ankora
file = open("/usercode/files/books.txt", "r")
for i in file.readlines():
print(i+str(len(i)))
file.close()
0
Okay, thanks I was forget to put one parentesis the scr and not str was at that time
0
I do this code almost 5 times