How can I use a delay?

I have a cube and I want it to change color “n” times but for each change I want there to be a delay to be able to visualize the color change. How can I implement the delay in my python code?
I have the following:

    cubo.color = [1,0,0,0]
    # Delay
    cubo.color = [0,1,0,0]
    # Delay
    cubo.color = [0,0,1,0]

Welcome to the community !

In python , you can do
import time

It should halt the execution for a moment