Learn how to check if a Python dictionary is empty, including five different ways to do this, including using simple booleans and its length.
Learn how to use Python to transpose a list of lists using numpy, itertools, for loops, and list comprehensions in this tutorial!
Learn how to create a Pandas dataframe from lists, including using lists of lists, the zip() function, and ways to add columns and an index.
Learn how to use Python to calculate the Euclidian distance between two points, in any number of dimensions in this easy-to-follow tutorial.
Learn how to use Python to check if a key (or a value) exists in a dictionary in a safe way, using the get method, in operator, and more!
Learn how to use Python to get a file extension, in Windows, Mac, and Linux. Learn how to do this with pathlib and os.path.
Learn how to use Python to get the dictionary key with the max value, including when the max value is in multiple keys.
Learn how to use Python while loops with multiple conditions, including and/or conditions, grouping conditions, and using the not operator.
Learn to use Python to remove punctuation from a string, including using translate, regular expressions, and more – and which way is fastest!
Learn how to find the index of the first or last substring of a string using Python. Also learn how to find all indices of a substring.
Learn how to print all of a Python object’s attributes using the dir() and vars() functions, and how to print pretty using the pprint module.
Learn how to split a Python list into n chunks, including how to split a list into different sized sublists or a different number of sublists.