← Back to challenges

True Alphabetical Order

PythonHardstringsloops

Instructions

Create a function which takes every letter in every word, and puts it in alphabetical order. Note how the original word lengths must stay the same.

Examples

true_alphabetic("hello world") ➞ "dehll loorw"

true_alphabetic("innokodakademija is awesome") ➞ "aabdee ei imosstw"

true_alphabetic("have a nice day") ➞ "aaac d eehi nvy"

Notes

  • All sentences will be in lowercase.
  • No punctuation or numbers will be included in the Tests.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.