Added python encoding snippet