Python Check Array Size Javascript Interview