0% found this document useful (0 votes)
4 views18 pages

Python Tuples and Lists Explained

The document introduces compound data types in Python, specifically tuples and lists. It covers various operations and manipulations related to these data types, including iterating over tuples, converting lists to strings, and performing operations such as aliasing, cloning, and sorting. The content is sourced from a computer science course at MIT.

Uploaded by

Abhishek Goutam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views18 pages

Python Tuples and Lists Explained

The document introduces compound data types in Python, specifically tuples and lists. It covers various operations and manipulations related to these data types, including iterating over tuples, converting lists to strings, and performing operations such as aliasing, cloning, and sorting. The content is sourced from a computer science course at MIT.

Uploaded by

Abhishek Goutam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python: Tuple, Lists

Introduction

• Have seen data type such int, float, char,…


scalar data.
• Compound data type:
– Tuple
– List
– Array

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Tuple

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Tuple

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Tuple
• Manipulating tuples: iterating over a tuple pf tuples

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists to String

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists: Other Operations

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists: Aliasing

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists: Cloning

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/
Lists: Sorting

Source:[Link]
programming-in-python-fall-2016/lecture-slides-code/

You might also like