interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / reverse-words-in-a-string / oracle.py

5 lines · 484 bytes Raw Blame History
1# Independent reference for "Reverse words in a string" (Python 3, standard library only).
2# expected.txt is this program's stdout; omc never produced it.
3lines = ['---------- Ice and Fire ------------', '', 'fire, in end will world the say Some', 'ice. in say Some', "desire of tasted I've what From", 'fire. favor who those with hold I', '', '... elided paragraph last ...', '', 'Frost Robert -----------------------']
4for line in lines:
5 print(" ".join(reversed(line.split())))