Thank you!
> You probably want to look at the itertools module. > > There you can find among others the count() generator function. > Others of possible interest include cycle() and repeat() Yeah, I'm going to check them now.and I just solved my first question by using numpy, as below: import timeimport numpy as np start = input("please input the value of start: ")end = input("please input the value of end: ")dur = input("please input the value of dur: ")array = np.linspace(float(start),float(end),1000)dur = float(dur)/len(array)for i in array: print(float(i)) time.sleep(dur) But, how to make it become a function?I tried to:def myFunction(start,end,dur):...........for i in array: return i time.sleep(dur) as you see, I failed... Thanks again! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor