+ 1

Can someone help with that code?

i wanna open a text file in python and count the lines of the text. i wrote that code with no effect. can someone tell me whats wrong? textfile=open("ab.txt", "r") lines= textfile.readlines() x=0 for line in lines: x=x+1 print(x) After that i wanna delete for every line of the text any numbers which are in the form (123456)(123456)

15th Jan 2017, 12:50 PM
Angel Our
Angel Our - avatar
2 Answers
+ 3
count = len(textfile.readlines())
16th Jan 2017, 2:11 PM
Robert Kavanaugh
- 1
length = count = len(textfile.readlines()) print(len)
19th Jan 2017, 8:28 AM
SUPERMATRIX
SUPERMATRIX - avatar