#try to avoid input function a = [1,2,3,4,5,6,7,8,9] for i in range(1,len(a)): print(a[:i])
Click the run button. Try to avoid input() function.