Create a Python program to generate random numbers between 1 and 10 of a specified length.
Length = 6
import random
def generate_random_nums(length):
  lst = []
  for _ in range(length):
    lst.append(random.randint(1, 10))
  return lst