mardi 8 septembre 2015

In Python, my String Comparisons are ALWAYS Coming Back False: [duplicate]

This question already has an answer here:

For some reason, all of my "if's" and "elif's" come back true no matter what

nyornj = raw_input("select ny or nj please")
newyork="NY" or "nj"
newjersey="NJ" or "nj"
if nyornj==newyork:
    print "New York was input"
if nyornj==newjersey:
    print "New Jersey was input"

Nothing seems to be working, any ideas why this would always come back true?

Aucun commentaire:

Enregistrer un commentaire