Python
Strings
A sequence of characters, using the syntax of either single quotes or double quotes
Tuples
Ordered sequence of objects (immutable). Once an element is inside of a tuple, it can not be re-assigned. Use parenthesis
Lists
Ordered sequences that can hold a variety of object types (mutable). They support indexing and slicing and can be nested, and have a variety of useful methods that can be called off of them. Use square brackets.
Are strings mutable?
Strings are not mutable! Strings are immutable. (meaning you can't use indexing to change individual elements of a string)
Dictionaries
Unordered mappings for storing objects. As opposed to lists which store objects in an ordered sequence, dictionaries use key value pairing instead. Use curly braces.
How do I create comments in my code?
You can use the hashtag # to create comments in your code
. How do I index a nested list? For example if I want to grab 2 from [1,1,[1,2]]?
You would just add another set of brackets for indexing the nested list, for example: my_list[2][1] .
Numbers
store a numerical value can be an integer (whole number) or floating point (a decimal number)