Smallest letter in a string
Regarding min(string): Python exceeding your expectations. It happens a lot.

assert

All assert statements can be disabled with a switch to the interpreter, and sometimes are. Therefore, they're not suitable for flow control. I think you should replace:

for character in string:
    assert ord(character) &lt;= 127


With:

for character in string:
    if ord(character) &gt; 127:
        raise ValueError(f"Character {character} is out of range.")


or to optimize with a generator instead of the loop (requires Python 3.8+ if you want to report the character that violates the condition):

if any(ord(character := char) &gt; 127 for char in string):
    raise ValueError(f"Character {character} out of range")


(Thanks to @Graipher for proper handling of the := token in 3.8+, which I hadn't worked with myself yet.)

That's all I can see being wrong here, though.