a = open("numbers.txt", "r") for line in a: print line #------------------------------------------ def describe(word): memory = "" for visitor in word: if visitor not in memory: memory = memory + visitor print visitor, "occurs", count(visitor, word), "time(s)" def count(letter, word): count = 0 for visitor in word: if visitor == letter: count = count + 1 return count #------------------------------------------ word = raw_input("Enter a word: ") letters = [] counts = [] for letter in word: if letter in letters: for l in range(len(letters)): if letters[l] == letter: counts[l] += 1 break else: letters.append(letter) counts.append(1) for i in range(len(letters)): print letters[i] + " occurs " + str(counts[i]) + " time(s)" #----------------------------------------------- This is a file that contains some information and it's useless and meaningless but it has lines and each line has words on it words like ryan giggs and such.