+ 1

How can I fix this code to identify my input word with the words either in the oldMe list or the new me list and print out ?

https://code.sololearn.com/cCqwRB6dGtH9/?ref=app

1st May 2021, 8:28 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar
7 Respostas
+ 2
JayVEL J-137 What you want to do? What output do you expect? https://code.sololearn.com/cYNj1zW4nZAp/?ref=app
1st May 2021, 8:41 PM
AÍąJ
AÍąJ - avatar
1st May 2021, 8:46 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar
+ 1
JayVEL J-137 What you want to do here? You have done lots of mistakes 1 - newMe is a list. You cannot compare string with a list like that. 2 - why you used break inside while loop because after 1st iteration process will stop there. 3 - mood is string then how you can increment 1 in mood.
1st May 2021, 8:33 PM
AÍąJ
AÍąJ - avatar
1st May 2021, 8:37 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar
+ 1
Either the print of the if Statement or the print of else Statement, since the word in the input should either be on both lists
1st May 2021, 8:42 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar
+ 1
🅰đŸ…č 🅐🅝🅐🅝🅣 This code of yours is amazing, I prefer yours more than mine
1st May 2021, 8:46 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar
+ 1
JayVEL J-137 You can check String present in both lists like this also if mood in newMe or mood in oldMe: print (count) Check code again
1st May 2021, 8:51 PM
AÍąJ
AÍąJ - avatar