list1 = [] for i in range(10, 51): list1.append(i) print(list1) print(list1[0], list1[-1], sep=(" "))