Hi All,
I'm having huge problems with a program that i am attempting to write. What i have is a program that prints Acronyms and sentences to a text file already, now i am trying to create a new program that reads that text file and if the user inputs the same acronym, it will print out the sentence associated with that acronym. This is what i have so far;
import string
def main():
acronymName = raw_input("Enter a sentence that may include more than one acronym ")
fileHandle = open ( 'acronym.txt', 'r' )
for line in fileHandle.readlines():
for acronym in line.split():
if acronym.enswith('nce'):
print acronym
fileHandle.close()
main()
Obviously Im not even sure if i am on the right track. Any help would be appreciated. I can't even seem to find a similar program to compare to.
Thanks Heaps..