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!") | |
sys.exit(0) | |
print("They are the same") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment