I'm somewhat new to python so sorry in advance but I cannot figure out why my unique counter is not increasing with every word that i put into a sequence to count how many palindromes/unique words there are.
user_input = input('Enter word sequence:')
string = user_input.split()
temp = [i[::-1] for i in string]
unique = 0
is_palindrome = 0
for i in range(len(temp)):
if temp[i] == string[i]:
is_palindrome += 1
else:
unique += 1
print('Sequence contains', unique, 'unique words, where', is_palindrome,
'words are palindrome.')
it is supposed to count the amount of unique words(not palindromes) and palindromes of a word sequence then output the answer.