"""Write a program that takes a list of numbers (for example, a = [5, 10, 15, 20, 25]) and makes a new list of only the first and last elements of the given list. For practice, write this code inside a function."""

def l_entry():
	l=[]
	n=input("enter the number of elements in the list:")
	for i in range(int(n)):
		l.append(int(input("enter the number:")))
	return l
	
l=l_entry()
l_new=[l[0],l[len(l)-1]]
print(l_new)
