Javascript Array Not Null In Python Code For Snake