OneCompiler

Python: Compare the Strings

Hi all, I am trying to find why am i getting 0/2 test cases passed, when I tried to execute below code, it worked fine but issue with submission, what am i doing wrong? kindly guide, Thanks

 #Take two strings from the input and print whether or not the strings are equal
# res = False
# if input() == input(): res = True
# print(res)

# Single liner
# print(input() == input())

str1 = input()
str2 = input()

resul = False
if str1 == str2:
  resul = True

print (resul) 

1 Answer

4 years ago by

@e learn

tried your code here https://onecompiler.com/python/3xkz9nfxn
You are printing True and False but as per the ask they should be true and false i.e the first letter of the result should not be capital letter

4 years ago by Karthik Divi