Ligeramente superior

Las dos listas tienen la misma longitud y son idénticas o difieren en una posición. Devuelve True solo cuando el valor de la primera lista es mayor en esa posición diferente. Devuelve False cuando las listas son idénticas.

Ejemplos

is_first_superior([1, 2, 4], [1, 2, 3]) ➞ True
# The pair of items at each index are compared in turn.
# 1 from the first list is the same as 1 from the second list.
# 2 is the same as 2.
# However, 4 is greater than 3, so list one is superior.

is_first_superior(["a", "d", "c"], ["a", "b", "c"]) ➞ True

is_first_superior(["zebra", "ostrich", "whale"], ["ant", "ostrich", "whale"]) ➞ True

is_first_superior([1, 2, 3, 4], [1, 2, 4, 4]) ➞ False

is_first_superior([True, 10, "zebra"], [True, 10, "zebra"]) ➞ False

Notas

  • Ambas listas tendrán la misma longitud.
  • Todos los valores y sus correspondientes siempre serán del mismo tipo de dato.
  • Las listas solo diferirán en un elemento.
  • Si las dos listas son iguales, devuelve False.