🔗 Link: https://awsrestart.instructure.com/courses/1632/modules/items/886824

☁️ Repo: https://github.com/francopig/aws-python/tree/main/06. Tipos de datos compuestos

Lab overview

composite data type is any data type that comprises primitive data types. If you like food, you can visualize a composite data type as a turducken, which is a dish that consists of a chicken that is stuffed into a duck, which is stuffed into a turkey. In this lab, you will create a data type that consists of a string that is in a dictionary, which is in a list.

In this lab, you will:


Creating a car inventory data

Comma-separated values (CSV) is a file format that's used to store tabular data, such as data from a spreadsheet. You will work with the CSV file from the following block.

  1. From the menu bar, choose File > New File.

    This action creates an untitled file.

  2. Choose File > Save As..., and save the file as car_fleet.csv

  3. Copy and paste the following text block into the car_fleet.csv file and save the file.

    vin,make,model,year,range,topSpeed,zeroSixty,mileage
    TMX20122,AnyCompany Motors, Coupe, 2012, 335, 155, 4.1, 50000
    TM320163,AnyCompany Motors, Sedan, 2016, 240, 140, 5.2, 20000
    TMX20121,AnyCompany Motors, SUV, 2012, 295, 155, 4.7, 100000
    TMX20204,AnyCompany Motors, Truck, 2020, 300, 155, 3.5, 0
    

    Tip: If a pop-up window opens with the message Native Clipboard Unavailable, use the keyboard, not the browser menu, to perform copy and paste actions. For example, on Windows, use CTRL+C and CTRL+V to copy and paste, respectively. On Mac, use Command+C and Command+V.