Python

Cyclone Phrase Verify

Check if an input string is a cyclone phrase

Use of slicing in python to efficiently manipulate a string.

The phrase is collapsed into one string. It is then reordered using slicing so the cyclone order is now linear. Finally each letter in the string is checked to see if it meets the qualifications of a cyclone phrase.

Example:

> python cyclone_phrase.py

> apple

> False

> python cyclone_phrase.py

> bote

> True