I need a program in Python, which would read from a file and print out title words on the screen. I started doing so and this is what I have so far:
info = open("info.txt", "r")
lines = info.readlines()
def function():
while True:
if lines.istitle():
print (lines)
if not lines.istitle():
break
But it does not seem to work. Any suggestions?