I was given a task where I'm supposed to detect if a word from variable (in this case 'text') is contained in 'positive_phrase'. But the detected word ('GOOD') in 'positive_phrase' are uppercaps while the 'good' in variable 'text' isn't, how do I make it capable of printing out the word although the word have uppercase it in while the other one is lowercase?
positive_phrase = ['GOOD','NiCe','FIne','Well']
text = "Doing good"
l = []
for i in text.split():
if i in positive_phrase:
l.append('Positive word founded: ',i)
' '.join(l)
The output is: '' But I was expecting for 'good' as my output, I have done several googling but none of them answered my question.