/**
 * Given a planet name and a list of planets, this function returns true if the given planet name exists in the list,
 * otherwise returns false. The function implements short-circuiting with if-else and membership concept.
 *
 * @param planetName The name of the planet to search for
 * @param planets The list of planets
 * @return true if planetName exists in planets, false otherwise
 */
fun findPlanet(planetName: String, planets: List<String>): Boolean {

    return planets.isNotEmpty() && planetName in planets  // Short-circuiting with if-else and membership
}

// Example Usage
/**
 * Given a planet name and a list of planets, this function returns true if the given planet name exists in the list,
 * otherwise returns false. The function implements short-circuiting with if-else and membership concept.
 *
 * @param planetName The name of the planet to search for
 * @param planets The list of planets
 * @return true if planetName exists in planets, false otherwise
 */
fun findPlanet(planetName: String, planets: List<String>): Boolean {
/**
 * Given a planet name and a list of planets, this function returns true if the given planet name exists in the list,
 * otherwise returns false. The function implements short-circuiting with if-else and membership concept.
 *
 * @param planetName The name of the planet to search for
 * @param planets The list of planets
 * @return true if planetName exists in planets, false otherwise
 */
fun findPlanet(planetName: String, planets: List<String>): Boolean {

    return planets.isNotEmpty() && planetName in planets  // Short-circuiting with if-else and membership
}

// Example Usage