Answer to Question #292645 in Python for apsnt

Question #292645

Are Strings Created Equally?

by CodeChum Admin

Do you believe in doppelgangers? Well they are very much possible with strings! Check if the two given strings are the same or not.


Instructions:

  1. Input two strings in different lines (one each line).
  2. Print out the strings in one line, separate them with a \.
  3. Check whether the two strings are equal, print out "Equal" if they are.

Input

Two lines containing a string on each.

hello
hello

Output

The first line contains the two inputted strings separated by a \.

The second line contains a string result.

hello\hello
Equal
1
Expert's answer
2022-02-03T08:39:05-0500
str1=input()
str2=input()
print(str1+"\\"+str2)
if str1==str2:
    print("Equal")
else:
    print("Not Equal")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS