Create a Python function to shuffle a list of numbers.
[1, 2, 3, 4, 5]
import random

def shuffle_list(nums):
 random.shuffle(nums)
 return nums

shuffled_list = shuffle_list([1, 2, 3, 4, 5])
print(shuffled_list) #[3, 5, 2, 4, 1]