def compare(song1, song2):
    """
    Compares two songs and returns which is prefferec (1 or 2) or returns
    0 if it's a tie. Numbers are returned as strings
    """
    print("1:", song1.name, "by", song1.artist, "or,")
    print("2:", song2.name, "by", song2.artist, "?")
    # x is evaluated as a string and acts as a menu choice
    while True:
        x = input("Chose by selecting 0, 1 or 2 ")
        if x == "1":
            return 1
        elif x == "2":
            return 2
        elif x == "0":
            return 0
        else:
            print("Please try again ")