from ipywidgets import interact
def myfunction(x):
    return x
interact(myfunction, x=('red','green'));

from ipywidgets import interact
def myfunction(x):
    return x
interact(myfunction, x=('red','green'));
