Variables and Mutable vs Immutable Data Types | Learning Python for Beginners | Code with Kylie #3

Опубликовано: 23 Март 2026
на канале: Kylie Ying
12,467
521

NEW AND IMPROVED LESSONS:    • How to Use Variables | Python for Beginner...  

Another week, another Code with Kylie video! Today we are talking about variables and mutability in data types.

This video is a part of the Code with Kylie series (learning python for the absolute beginner):    • Python for the Complete Beginner | Code wi...  

Variables are values that can vary. We assign these in Python by declaring a variable name and assigning it a value through the assignment operator. I go over the rules in declaring variable names in this video. I show you how to visualize variable assignments with diagrams where the variables point to values in memory.

Mutability is the ability to change. Basically, in Python, we have mutable and immutable data types. Mutable data types include lists, sets, and dictionaries. We can change the items in the collection without recreating the entire collection again. Meanwhile, immutable data types include strings, numbers, booleans, and tuples.

In this video, I also talk about when you should use immutable data types and when you should use mutable data types. We use these for different reasons!

Check out these resources!
More about variables: https://www.w3schools.com/python/pyth...
Mutable vs immutable data types: https://www.geeksforgeeks.org/mutable...

Feel free to leave any questions.

Please consider subscribing if you liked this video: https://www.youtube.com/c/ycubed?sub_...

Thanks for watching everyone!
~~~~~~~~~~~~~~~~~~~~~~~~
Follow me on Instagram:   / yueyangy  
Follow me on Twitter:   / y_cubed  
Check out my website: https://www.kylieying.com