You are here

4 May 2016

This short snippet shows how to define an array in Python.

Source code viewer
  1. # Define an array.
  2. cars = ['mitsubishi', 'toyota', 'jeep']
  3. # Define a "keyed array" or in Python they are called "Dictionaries".
  4. cars = {'carisma': 'mitsubishi', 'prius': 'toyota'}
Programming Language: Python