Starting With Python Tuples: Python Basics

preview_player
Показать описание
This is a preview of Python Basics: Tuples and Lists video course. It provides an introduction to working with tuples. You can use them to store and organize a collection of objects, which can be of any data type. Instead of just storing one item, a tuple can hold multiple items. Tuples are immutable meaning you can’t modify them after you’ve created them. You'll also learn about similarities with Python strings.

This is a portion of the complete course, which you can find here:

The rest of the course covers:

- What lists and tuples are and how they’re structured
- How lists and tuples differ from other data structures
- Changing elements in a list
- Nesting of lists
- Shallow vs Deep copies using lists
- How to define and manipulate lists and tuples in your Python code
Рекомендации по теме
Комментарии
Автор

tpl = 'tuples', 'are', ['mutable', ]
tpl[2].append('in some cases')

Please, check id(tpl) and make sure they are identical. Data in a tuple (with a list item for example) can be changed

samoylov