word = raw_input("Enter the word: ") counter = 0 length = len(word) for i in range(length): # for each letter in the word... for j in range(length-i-1): # for each letter after that one... if word[i]==word[i+j+1]: counter = counter + 1 if counter>0: print "There are repeated letters" else: print "There are no repeated letters"