Untitled 15
Untitled 15
txt and displays those lines which begin with the word ‘You’.
with open("Alpha.txt","r") as file:
lines=file.readlines()
for line in lines:
words=line.split()
if word[0]=="You":
print(line) #DISPLAYING THE LINE STARTING WITH "YOU"