Загрузка...

Why can you change a list but NOT a string? | Mutable vs Immutable | Python #Shorts #cbse #class12cs

Try to change a single letter in a Python string — and Python throws an error.
But lists allow such changes. Why? 👇

This Short explains:
→ What immutable means — and which types are immutable
→ What mutable means — and which types are mutable
→ The difference between re-assigning a variable and modifying an object
→ A full reference table of every type's mutability

Perfect for CBSE Class 11 & 12 Python revision.

─────────────────────────────────
CHAPTERS
─────────────────────────────────
0:05 Immutable: str throws a TypeError
0:24 Mutable: list — add and remove items live
0:41 Quick reference table — all types

─────────────────────────────────
RELATED VIDEOS
─────────────────────────────────
▶ Python Data Types Part 1 — Numbers
▶ Python Data Types Part 2 — Sequences
▶ Python Data Types Part 3 — Sets & Dicts
▶ Python Data Types Part 4 — bool
▶ Python Data Types Part 5 — None

─────────────────────────────────
PERFECT FOR
─────────────────────────────────
✔ CBSE Class 11 — Introduction to Python
✔ CBSE Class 12 — Review of Python
✔ Anyone learning Python from scratch

#Python #CBSE #Class11 #Class12 #PythonMutability
#Immutable #Mutable #PythonDataTypes #LearnPython
#PythonBeginners #CBSEComputerScience #Shorts #PythonTips

Видео Why can you change a list but NOT a string? | Mutable vs Immutable | Python #Shorts #cbse #class12cs канала CodeSchool
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять