{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"toc_visible":true,"authorship_tag":"ABX9TyNLoETExfHXRIUoH4tHOp06"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Data Structures\n","\n","
Name | Syntax | Example | Description |
---|---|---|---|
String | str(), \"\" | \"Hello world!\" | Sequence of characters |
List | list(), [] | [\"apple\", \"banana\", \"pear\"], [1, 3, 5, 7] | Sequence of objects/values |
Dictionary | dict(), {} | {'first_name': 'Knute', 'last_name':'Rockne', 'class':'1918'} | Key-value pairs |
Set | set(), {} | {\"apple\", \"banana\", \"pear\"}, {1, 3, 5, 7} | Unordered group of unique values |
Tuple | tuple(), () | (\"apple\", \"banana\", \"pear\"), (1, 3, 5, 7) | Ordered group of values that can include duplicates |