Python Check Array Size Javascript Map Set