Lecture 10: Lists and Mutability (FIXED)

preview_player
Показать описание
MIT 6.100L Introduction to CS and Programming using Python, Fall 2022
Instructor: Ana Bell

This lecture explores list operations and mutability: mutation, aliasing, and tricky examples with loops over L. Lists and tuples provide a way to organize data that naturally supports iterative functions. Tuples are useful when you have data that doesn’t need to change, e.g., (latitude, longitude) or (page #, line #). Lists are useful in dynamic situations, e.g., a list of daily top 40 songs or a list of recently watched movies.

License: Creative Commons BY-NC-SA

Рекомендации по теме
Комментарии
Автор

NOTE: The audio problems have been fixed!

mitocw
Автор

Thank you MIT!, Thank to you Dr.Ana Bell, Thank you Internet ! And thank you YouTube.

mohamedbelazreg
Автор

Hi..! I have check so many courses but the way you are teaching and especially explaining in details with basics is great..! I m at leacture 10 now..! Thanks for the course ❤

salmanqadeer
Автор

Excellent lecture. Thanks=[ ‘A Lot !’]
The mystery of tricky mutable objets is revealed.
Thanks.append(Thanks)

pascalpascal
Автор

I love how my questions aka “can’t we just type ... though?” get answered on the upcoming slide 😂 Feels like I literally do ask them in person

lisastegnii
Автор

5:19 Look at top right, liang left his mark 😂😂

ziaahmad
Автор

What happens if you create a tuple within a list. Can you change it to another tuple? since you list object is mutable

ChrisL-zh