Explain the difference between a list and a generator in Python, and when you would use each for processing large datasets.