Design a Python program for comparing two strings and printing "Equal" if the strings…
- User
Design a Python program for comparing two strings and printing "Equal" if the strings are equal, or "Not Equal" if the strings are not equal. string1 = "hello" string2 = "world"
Assistant
Problem: Design a Python program for comparing two strings and printing "Equal" if the strings are equal, or "Not Equal" if the strings are not equal. string1 = "hello" string2 = "world"
Let me implement this solution.
Here is the Python program to compare the two strings:
string1 = "hello" string2 = "world" if string1 == string2: print("Equal") else: print("Not Equal")Output:
Not Equal