Python 3 + colorama
, 177 176 175 167 166 162 160 bytes
I used colorama
when I was interested in coloring stdout
, and it certainly should help here!
(Also used because The Thonnu's answer was really long)
import colorama,time;colorama.init()
def m(n):[print(end=i+" ")==time.sleep(.5)for i in n.split()]
m("\033[34mI'm Blue,")
while 1:m("Da, Ba, Dee, Da, Ba, Die,")
How to use:
As The Thonnu pointed out, this program fails on TIO, so to execute it:
- Download IDLE (if you don't have it)
- Open your terminal
- Type
py -m pip install colorama
- Create a new file
- Copy the code
- Save it (here it will be
colored.py
)
- Type
py -m colored
(or whatever you saved the file as without the py
part) on your terminal.
See this video that shows it being done.
Direct downloading version, 223 bytes:
Will download colorama
from pip and executes.
import os,time
os.system("py -mpip install colorama")
import colorama;colorama.init
m=lambda n:print(end="\033[34m"+n)or time.sleep(.5)
m("I'm ");m("Blue, ")
while 1:
for i in['Da','Ba','Dee','Da','Ba','Die']:m(i+", ");
Non-Windows version, 135 bytes:
On windows platforms, Colorama is required for initializing the terminal. Other ones, don't think so.
import time
def m(n):[print(end=i+' ')==time.sleep(.5)for i in n.split()]
m("\033[34mI'm Blue,")
while 1:m("Da, Ba, Dee, Da, Ba, Die,")