Construir y deconstruir

Dada una cadena, crea una función que devuelva una lista, construyendo y deconstruyendo la cadena letra por letra. Consulta los ejemplos siguientes para obtener orientación.

Ejemplos

construct_deconstruct("Hello") ➞ [
  "H",
  "He",
  "Hel",
  "Hell",
  "Hello",
  "Hell",
  "Hel",
  "He",
  "H"
]

construct_deconstruct("edabit") ➞ [
  "e",
  "ed",
  "eda",
  "edab",
  "edabi",
  "edabit",
  "edabi",
  "edab",
  "eda",
  "ed",
  "e"
]

construct_deconstruct("the sun") ➞ [
  "t",
  "th",
  "the",
  "the ",
  "the s",
  "the su",
  "the sun",
  "the su",
  "the s",
  "the ",
  "the",
  "th",
  "t"
]

Notas

Incluye los espacios (consulta el ejemplo n.º 3).