Implement a function in Python that takes a number n and generates a random list of integers between 0 and n.
n = 10
import random

def randomList(n):
 list = []
 
 for i in range(n):
 list.append(random.randint(0, n))
 
 return list

print(randomList(10))