Time.sleep() slows down abruptly from the set time

I am making a game that prints dialogue in a typewriter sort of style, where each character is printed using a for loop and time.sleep(0.04) as the delay for each character. (link to code below) The code works fine, and each character should print with a 0.04 sec delay between each character. However, the delays abruptly slows down when the set value for time.sleep() is less than 1 sec. As a result, the rate at which characters are printed, is much slower, but still constant. The code worked perfectly fine, without this odd mishap a few weeks back. I suspect a Replit update may have caused the code to stop working as intended.

code: https://replit.com/@JadonXia1/scrap2?v=1

Huh that is odd @JadonXia1

Hi @JadonXia1 closing as this is a duplicate post of Time.sleep() slows down abruptly from the intended set time.