Ad
  • Default User Avatar

    You can use the python buildin len() function to get the size of any iterable.
    len( yourArray ) will return 0 in case the array is empty.

  • Default User Avatar

    Just want to mention that this one fails when there is a single element list inside the list like this [['a'],'a','b'].
    But I think it is very likely that the full attempt has been changed in between, because this little detail is not mentioned in the description. And probably other solutions will also fail now, but this one I was interested in ;o)