from pylab import * def x(t) : if 0 <= t < 8 : return(2*t) elif 8 <= t < 20 : return(t**3) t = arange(5.0, 20, 0.3) print([i for i in t])