Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
13 Cards in this Set
- Front
- Back
- 3rd side (hint)
Function |
def function_name (args): """Docstring""" body |
One thought/ action |
|
List |
list_name = [] Mutable, ordered, iterable |
|
|
Slicing |
dataname [start:stop:step] Can be used on any ordered structure- i.e list, tuple, string Inclusive of start, exclusive of stop |
|
|
xrange |
xrange (start:stop:step) Returns an xrange object- iterable indexes from an ordered data structure created as needed, rather than range which returns a list of indicies for iterating |
|
|
Tuple |
tuple_name = (thing, thing) Ordered, immutable, iterable |
|
|
set + set arithmatic |
set_name = ([itema, itemb, itemc]) immutable, unordered, unique, iterable |
set1 | set2 #returns joined sets set1 & set2 # returns intersection of sets set1 ^ set2 #returns unique values between sets set1 - set2 #returns overlapping values- eliminates unique values between set |
|
dictionary (creation) |
dictionary_name = {key : value, key1 : value1} unique, iterable, immutable contains keys : values |
|
|
setting dictionary value |
dictonary_name[key] = value |
|
|
accessing dictionary value |
dictionary_name[key] |
|
|
Print statements |
tabbing in: "\tText" newline: "\nText" |
|
|
dictionary_name.items(): |
returns all keys:values from a dictionary in format: [("Key" : Value)] |
for key, value in dictionary_name.items(): print key, value >>> Key Value Key Value Key Value |
|
dictionary_name.get(key) |
if key in dictionary, returns value. If key not in dictionary, returns None |
a way to check if something is in a dictionary without breaking the process if item isn't present |
|
hash("string") |
converts a string into a number |
|