Tutorial 1

Data structures (Lists, Dictionaries, Sets, Indexing and Slicing)

Tutorial Description

Introduction

Brief introduction to Python's basic data structures.

Sequences

  • Differences between strings, lists, and tuples.
  • Key takeaway about mutability: Lists can be changed, tuples cannot.

Indexing

  • Learn how to access individual elements of strings, lists, and tuples.
  • Observations on how Python's indexing starts at 0.

Slicing

  • Techniques to extract portions of sequences.
  • Examples showing how to use slicing effectively with sequences.

Sets

  • Introduction to the properties and utilities of Python's set data structure.
  • Observation on the unique characteristics of sets, like automatic removal of duplicates.

Dictionaries

  • Understand dictionaries as key/value pairs.
  • Learn to create, access, and manipulate dictionary elements.

Tutorial Exercise

  • Hands-on tasks to strengten understanding of the topics covered.
  • Practical examples to extract elements from lists and tuples and work with dictionaries.
The tutorial notebook and exercise could be found at JupyterHub on shared-storage/tutorials/tutorial1/exercise