def allStudentsMajoringIn(thisMajor,listOfStudents):
    """
    return a list of the students with the major, thisMajor

    >>> majorToLNames("MATH",[Student("MARY","KAY","MATH"), Student("FRED","CRUZ","HISTORY"), Student("CHRIS","GAUCHO","UNDEC")])
    [Student(fName='MARY',lName='KAY',major="MATH")]
    >>> 
    """

    answerList = []
    for student in listOfStudents:

       # step through every item in listOfStudents
       # when you find a match, return that students's major

        if student.major == thisMajor:
            answerList.append(student)

    # if you got all the way through the loop and didn't find
    #  the name, return False

    return answerList