+ 1
I don't know why it giving me ...un valid syntax in line 8 (file . close ),can any one tell why ,or give a clue what it be
lines=file.readlines() for i in lines: lines = i.replace("\n","") print (lines[0] +str(len(lines)) file.close()
2 Answers
+ 2
What is 'file' there? Pls share full code.
edit: Musab Adam between you are missing a closing brace ) in print statement
+ 1
Thank you for your help ...it turned out that I mess closing brace ") " ...