Python User Input Array Javascript Push And Pop In Stack