+ 1

In the "It's a sign" question, can anyone say why the test cases 3 and 5 is getting failed.

Below is my code getwords = input().split() print(getwords) res = 0 for val in getwords: if(val == val[::-1]): res = 1 if(res!=0): print('Open') else: print('Trash')

14th Jun 2020, 2:03 AM
ARUN VS
ARUN VS - avatar
3 Réponses
+ 5
Take a close look at how input is given. It's not a single line separated by spaces but 4 different lines so you need input 4 times... Don't hesitate to ask for more hints if needed.
14th Jun 2020, 4:21 AM
Kevin ★
0
Did you ever figure it out? Because I came up with a solution and would like to share outcomes with you if you'd like?
14th Dec 2021, 11:18 PM
Stephen Norton
Stephen Norton - avatar
0
Sure
2nd Jun 2022, 12:25 PM
ARUN VS
ARUN VS - avatar