Why my code is failing testcase 5 for problem String Window?

Below is the link for my python code.





Can you please help me what I missed?

hello @thirumeni.m07

debug ur code for this input->
kgfidhktkjhlkbgjkylgdracfzjduycghkomrbfbkoowqwgaurizliesjnveoxmvjdjaepdqftmvsuyoogobrutahogxnvuxyezevfuaaiyufwjtezuxt…
beraqtiol

expected output->
liesjnveoxmvjdjaepdqftmvsuyoogobr

Hi Aman,
I ran the same python code in intellij ide, I am getting the correct output.

Please see the screenshot below and refer the link for python code.



I hope my code is correct. What do you think?

yeah ,but on cb ide its giving different result.
probably its platform related issue

1 Like

I think there is ‘\n’ at the end of small_string for test case 5. I placed a check for ‘\n’ and it worked. Hope this will help.

1 Like

Yes. Stripping off the newline character worked. Thank you Prashant.
Anyway, I feel that input for testcase 5 should be corrected or in the problem statement such things(input string might contain newline) should be mentioned.