Author: 👤 David Beazley & 👤 Brian K. Jones
Type: #book
Genres: #comp-sci
heapq.nsmallest
to find the smallest or largest N itemsdefaultdict
to map keys to multiple values.keys()
and .items()
callsslice
objects to name slices and avoid hardcodingcollections.Counter
to find most common itemscollections.Counter
featuresitertools.groupby()
re.split()
for advanced string splitting.startswith()
and .endswith()
re.sub()
timedelta
objects to total secondsrange()
function equivalent for datesprint
function separator characteros.path
os.path
__repr__
method__str__
method_internal
attributes and methods__private
attributes and methods@property
decoratorsuper()
to call parent methodsoperator.methodcaller()
timetit()
-