C1_w3 assignement Question 1- Design of the code

Hi all,

I’ve been able to answer the first question, quite easy. However, I was wondering if there is a better design than the one I did to find the size of the set. Is there a better design to get it ?

Here is my code:

Hello @Gaetan593
Yes, I think you can also use np.size. It should return the total number of elements in an array, regardless of its shape.

Please edit the post and remove your answer, It goes against our community guidelines to share answers publicly

Kind regards
Isaak