Python Reference Sheet
This is mostly here a collection/reference of my personal most-used functions and syntaxes that I look up a lot.
Data Structures
Arrays:
arr.split(delim)
(delim).join(arr)
len(arr)
arr.lower()
arr.upper()
unique values:
Time and space complexity of common processing functions
list_2_arr = [char for char in str_2]
str_2[x:x+len(str_1)]
Serialization and deserialization
Dictionaries
Classes
Syntax
class Foo:
class_variable def init(self, a): self.a = a self.b = []
def add_b(self, c): self.b.append(c)