def bf(planet1, planet2):
    planet_names = ("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune")
    if planet1 not in planet_names or planet2 not in planet_names or planet1 == planet2:
        return ()
    planet1_index = planet_names.index(planet1)
    planet2_index = planet_names.index(planet2)
    if planet1_index < planet2_index:
        return (planet_names[planet1_index + 1: planet2_index])
    else:
        return (planet_names[planet2_index + 1 : planet1_index])
def bf(planet1, planet2):
    planets = (
        "Mercury",
        "Venus",
        "Earth",
        "Mars",
        "Jupiter",
        "Saturn",
        "Uranus",
        "Neptune",
    )
    if planet1 not in planets or planet2 not in planets or planet1 == planet2:
        return ()
    planet1_index = planets.index(planet1)
   
    planet2_index = planets.index(planet2)
    if planet1_index < planet2_index:
        return planets[planet1_index + 1 : planet2_index]
    else:
        return planets[planet2_index + 1 : planet1_index]