Write a Python program to generate a list of squares of numbers between 1 and 20 (both nos included) and print ONLY the first and last 5 elements
num_list = list(range(1,21))
sq_list = [r for r in map(lambda x: x**2 , num_list)]
print("the first five elements are \n{}\n the last five elements are\n{}".format(sq_list[:5] , sq_list[-5:]))