basic-programming-learning-phase-1

Module 04 — Data structures

Concepts

Practice prompts

  1. Create a list of 5 fruits; print the first and last with indexing.
  2. Slice [0, 1, 2, 3, 4, 5] to get [1, 2, 3, 4].
  3. Given d = {"a": 1, "b": 2}, print all keys and all values.
  4. From two lists, build a set of unique elements combined.
  5. Use a list comprehension to make [1, 4, 9, 16, 25] from [1..5].

Complete the TODOs in starters.py.