How come a string multiplied by negative integer results in empty string?

python

Solution

The docs on `s * n` say:

Values of n less than `0` are treated as `0` (which yields an empty sequence of the same type as s).

Problem

``` '0424242' * -5 ``` I understand how multiplying by strings work fundamentally, but I just stumbled on this strange fact that multiplying by negative numbers yields an empty string and thought it was interesting. I wanted to know the deeper why beneath the surface. Anyone have a good explanation for this?

Original source