← Back to challenges

Spelling it Out

PythonHardstringsarrays

Instructions

Create a function which takes in a word and spells it out, by consecutively adding letters until the full word is completed.

Examples

spelling("bee") ➞ ["b", "be", "bee"]

spelling("happy") ➞ ["h", "ha", "hap", "happ", "happy"]

spelling("eagerly") ➞ ["e", "ea", "eag", "eage", "eager", "eagerl", "eagerly"]

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Chocolate Dilemma