update python main snippet