import time def fade_in_print(text, delay=0.05): for i in range(len(text)): print(text[i], end='', flush=True) time.sleep(delay) print() # Example usage fade_in_print("Hello, world!")