yee ya ( 1 ) The len will not cause an error but the + will, because the len(i) will return an integer and we cannot concatenate integer and string unless if we convert that integer to string. ---> str(len(i)) ( 2 ) The variable "i" in the "for loop" represents each line of the file content therefore we dont need to read the file again by using "file.read(1)", we can just use the variable "i" instead. To get the first letter of each line: ---> string or i  Additional: string.strip() as I said earlier will remove the spaces and "\n" at the end of the string because we only need to count the length of the character of the string exluding the escape character. https://code.sololearn.com/cQtOmn0fxpG1/?ref=app
yee ya Well.. same here. All the best! and Good luck to both of us!
Please show us your attempt so far so we may help. Thanks Here are some hints: len ---> length of string You can use file.readlines() to have a list with each line of the file as its each element. Or you can just iterate the file by using for loop. string.strip() removes the "\n" at the end of the string.
yee ya Actually yes you can do some math, if-else condition to be specific. If "i" variable has "\n" at the end then, "len(i) - 1" Else if the "i" variable is the last line of the file i.e. no "\n", then just "len(i)" This is the common solution I see and this is working properly but just longer. https://code.sololearn.com/cr66jfio7h78/?ref=app
help my code does not iterate
What's wrong with this??
What is the problem 🤨🧐??
Generador de divicion python.