For example if my text file is:
blue green yellow black
Here there are four lines and now I want to get the result as four. How can I do th
this one also gives the no.of lines in a file.
a=open('filename.txt','r') l=a.read() count=l.splitlines() print(len(count))