Python

Deep Copy Object

Use copy.deepcopy().

Auto Enumerations

Like iota in golang:

from enum import Enum, auto
class Color(Enum):
    RED = auto()
    GREEN = auto()
    BLUE = auto()

Sort Tuple List

tup_list.sort(key=lambda tup: tup[0])

Iterate with Index

for i, v in enumerate(arr):
    pass