Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
python compare two strings
#compare two strings from user input
from cs50 import get_string
import sys
def main():
stringOne = get_string("enter string one: ")
stringTwo = get_string("enter string two: ")
if stringOne != stringTwo:
print("They are NOT the same!")
print("They are the same")
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment