Write a Python program to generate a random string with the given length.
Length: 8
import string
import random

def generate_random_string(length):
  characters = string.ascii_letters + string.digits 
  return ''.join(random.choice(characters) for i in range(length))