Brief
=====
Sometimes we need information about the list/arrays we're dealing with. You'll have to write such a function in this kata. Your function must provide the following informations:  

* Length of the array
* Number of integer items in the array
* Number of float items in the array
* Number of string character items in the array
* Number of whitespace items in the array
   
The informations will be supplied in arrays that are items of another array. Like below:

`Output array = [[array length],[no of integer items],[no of float items],[no of string chars items],[no of whitespace items]]`

Added Difficulty
----------------
If any item count in the array is zero, you'll have to replace it with a **None/nil/null** value (according to the language). And of course, if the array is empty then return **'Nothing in the array!**. For the sake of simplicity, let's just suppose that there are no nested structures.   
Output
======
If you're head is spinning (just kidding!) then these examples will help you out-   
```
   
array_info([1,2,3.33,4,5.01,'bass','kick',' '])--------->[[8],[3],[2],[2],[1]]    
array_info([0.001,2,' '])------------------------------>[[3],[1],[1],[None],[1]]   
array_info([])----------------------------------------->'Nothing in the array!'
array_info([' '])-------------------------------------->[[1],[None],[None],[None],[1]]
  
  ```    
Remarks
-------
The input will always be arrays/lists. So no need to check the inputs.    
Hint
====
See the tags!!!   
Now let's get going !

Difficulty: introductory

Starter code:

def array_info(x):
	

Solutions:
def array_info(x):
    if not x:
        return 'Nothing in the array!'
    return [
        [len(x)],
        [sum(isinstance(i, int) for i in x) or None],
        [sum(isinstance(i, float) for i in x) or None],
        [sum(isinstance(i, str) and not i.isspace() for i in x) or None],
        [sum(isinstance(i, str) and i.isspace() for i in x) or None],
    ]

array_info=lambda x: [[len(x)],[len([a for a in x if type(a)==int]) or None],[len([a for a in x if type(a)==float]) or None],[len([a for a in x if type(a)==str and a!=" "]) or None],[len([a for a in x if a==" "]) or None]] if len(x) else 'Nothing in the array!'

from collections import defaultdict

def array_info(arr):
    d = defaultdict(int)
    for v in arr:
        d[type(v)] += 1
        d[' ']     += v==' '
    if not arr: return 'Nothing in the array!'
    return [[x or None] for x in (len(arr), d[int], d[float], d[str]-d[' '], d[' '])]

def array_info(x):
    TheDICT = {'len':[1,len(x)], int:[2,0], str:[4,0], float:[3,0], 'void':[5,x.count(' ')]}
    for e in x:
        if e != ' ':
            TheDICT[type(e)][1] += 1
    return [ [e[1] if e[1] else None] for e in sorted( TheDICT.values() ) ] if x else 'Nothing in the array!'
            
        


def array_info(x):
    if not x: return 'Nothing in the array!'
    L = [0]*4
    for e in x:
        if   type(e) == int:   L[0] += 1
        elif type(e) == float: L[1] += 1
        elif e == ' ':         L[3] += 1
        else:                  L[2] += 1
    return [[len(x)]] + [[e or None] for e in L]

def array_info(arr):
    res = [len(arr), 0, 0, 0, 0]
    for i in arr:
        if type(i) == int:
            res[1] += 1
        elif type(i) == float:
            res[2] += 1
        elif type(i) == str:
            if len(i) * ' ' == i:
                res[4] += 1
            else:
                res[3] += 1
    return [[i] if i else [None] for i in res] if arr else 'Nothing in the array!'

def array_info(x):
    if not x: return 'Nothing in the array!'
    ints = floats = strings = whitespaces = 0
    for e in x:
        if isinstance(e, str):
            if e.isspace():
                whitespaces += 1
            else:
                strings += 1
        else:
            if float(e).is_integer():
                ints += 1
            else:
                floats += 1
    return [[c or None] for c in (len(x), ints, floats, strings, whitespaces)]

def array_info(x):
    if len(x)==0: return 'Nothing in the array!'
    info = [[len(x)], 
            [sum(1 for y in x if isinstance(y, int))], 
            [sum(1 for y in x if isinstance(y, float))], 
            [sum(1 for y in x if (isinstance(y, str)) and y!= " ")], 
            [sum(1 for y in x if y==" ")]]
    for j, i in enumerate(info): 
        if i == [0]: info[j]=[None]
    return info

def array_info(x):
    
    if not x: return 'Nothing in the array!'
    
    a,b,c,d,e = [len(x)],\
                [len([y for y in x if isinstance(y, int)])],\
                [len([y for y in x if isinstance(y, float)])],\
                [len([y for y in x if isinstance(y, str) and y != ' '])],\
                [len([y for y in x if y == ' '])]
                
    return [a if a[0] != 0 else [None],
            b if b[0] != 0 else [None],
            c if c[0] != 0 else [None],
            d if d[0] != 0 else [None],
            e if e[0] != 0 else [None]]

def array_info(x):
    return [[len(x) or None],[sum(isinstance(n,int) for n in x) or None],[sum(isinstance(n,float) for n in x) or None],[sum(isinstance(n,str) and n!=" " for n in x) or None],[sum(n==" " for n in x) or None]] if x else "Nothing in the array!"