← Back to challenges

Is the String in Order?

PythonHardlogicstringsvalidation

Instructions

Create a function that takes a string and returns True or False, depending on whether the characters are in order or not.

Examples

is_in_order("abc") ➞ True

is_in_order("innokodakademija") ➞ False

is_in_order("123") ➞ True

is_in_order("xyzz") ➞ True

Notes

You don't have to handle empty strings.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Convert to Decimal Notation