human
Can you show me a Python function to can you set a list to a certain size.
assistant
Here is a Python function to can you set a list to a certain size

import random

def set_list_size(list, size):
    """Set list to a certain size."""
    if len(list) > size:
        list.pop(0)
    elif len(list) < size:
        list.extend([0] * (size - len(list)))

# Enter the list
list = [random.randint(-10, 10) for i in range(10)]

# Enter the size
size = 5

# Calling the function
print((set_list_size(list, size)))

#Example Output
# None

#Remember to inspect code for bugs.