Develop a Python code which can search for a name in a list and return the position of the name in the list.
["John", "Richard", "Paul", "Ringo"]
def search(name_list, name): 
    for i in range(len(name_list)): 
        if name_list[i] == name: 
            return i 
    return -1