main snippet for python