Small python code sniplets