Just Python code snippets I really enjoyed
In Python, the shortcut row[~i] = row[-i-1] = row[len(row) - 1 - i].
Check for leading zeros in a string representation of a number, len(string) == len(str(int(string))).
What are mutable and immutable data types in Python?
Python Mutable data types are those whose values can be changed in place whereas Immutable data types are those that can never change their value in place.
Mutable: Lists, Dictionaries, Sets
Immutable: Integers, Floatin-Point numbers, Booleans, Strings, Tuples