Explain the difference between a list and a tuple in Python, focusing on mutability and memory allocation.