Your question is Reverse Words in a String. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A MITRE ATT&CK content utility needs to display the words in a procedure description in reverse order. Given a string text, return a string containing the same words in reverse order, separated by exactly one space.
Leading, trailing, and repeated whitespace must be removed from the result. A word is any maximal sequence of non-whitespace characters. Do not use split(), reversed(), or slicing to reverse the text.
Implement reverse_attack_words(text).
text, a Python string.def reverse_attack_words(text):