(text)
| 18 | """ |
| 19 | |
| 20 | def parseDirections(text): |
| 21 | words = { |
| 22 | 'N': 'north', |
| 23 | 'S': 'south', |
| 24 | 'E': 'east', |
| 25 | 'W': 'west', |
| 26 | } |
| 27 | output = [words[w] for w in list(text)] |
| 28 | return ' '.join(output) |
| 29 | acronyms = re.findall(r'\b([NESW]+)\b', text) |
| 30 | |
| 31 | for w in acronyms: |