Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 444 Bytes

File metadata and controls

12 lines (8 loc) · 444 Bytes

Dictionaries

What are dictionaries in Python?

Dictionairies are a collection of data in the format of 'key and variable', so each element contains two pieces of information.

my_dict = {'Orange':50, 'Apples':80, 'Bananas':99}

The above example shows how dictionaries are displayed, and their key:value pairing syntax. Dictionairies are always displayed within curly braces {} and are usually asigned to variable names.