def remove_one(name_list, name): name_list = name_list.replace(name + ",", "") print(name_list) return name_list name_list = "Chico, Harpo, Groucho, Gummo, Zeppo," name_list = remove_one(name_list, "Gummo") name_list = remove_one(name_list, "Zeppo") print(name_list)