Python Implementation of Push