Computer Science, asked by rohitkunarohit, 7 months ago

Write a python program to check whether the given word is present in a file or not.​

Answers

Answered by harnathyadav2907
0

Explanation:

Write a Python program to count the number of lines in a text file.

  1. Contain of text.txt. ...
  2. Sample Solution:-
  3. Python Code: def file_lengthy(fname): with open(fname) as f: for i, l in enumerate(f): pass return i + 1 print("Number of lines in the file: ",file_lengthy("test.txt")) ...
  4. Flowchart:
  5. Python Code Editor:
Similar questions