Generate Array Javascript Push Method In Python