← Back to challenges

Correct Inequality Signs

PythonHardstringsregexvalidation

Instructions

Create a function that returns True if a given inequality expression is correct and False otherwise.

Examples

correct_signs("3 < 7 < 11") ➞ True

correct_signs("13 > 44 > 33 > 1") ➞ False

correct_signs("1 < 2 < 6 < 9 > 3") ➞ True

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Vowel Replacer