Write a function groupIn10s which takes any number of arguments, and groups them into sets of 10s and sorts each group in ascending order.

The return value should be an array of arrays, so that numbers between 0-9 inclusive are in position 0 and numbers 10-19 are in position 1, etc. 

Here's an example of the required output:

```python
grouped = group_in_10s(8, 12, 38, 3, 17, 19, 25, 35, 50) 

grouped[0]     # [3, 8]
grouped[1]     # [12, 17, 19]
grouped[2]     # [25]
grouped[3]     # [35, 38]
grouped[4]     # None
grouped[5]     # [50]
```
``` haskell
groupIn10s [8, 12, 3, 17, 19, 24, 35, 50] `shouldBe`  [[3,8],[12,17,19],[24],[35],[],[50]]
```

Difficulty: introductory

Starter code:

def group_in_10s(*args):
	

Solutions:
from collections import defaultdict
def group_in_10s(*args):
    if not args: return []
    tens = defaultdict(list)
    for n in sorted(args): tens[n//10].append(n)
    return [tens.get(d, None) for d in range(max(tens) + 1)]

from itertools import groupby

def group_in_10s(*args):
    if not args:
        return []
    groups = dict((k, list(xs)) for k, xs in groupby(sorted(args), lambda x: x // 10))
    return [groups.get(i) for i in range(max(groups) + 1)]

from collections import defaultdict

def group_in_10s(*nums):
    dct = defaultdict(list)
    for n in sorted(nums):
        dct[n//10].append(n)
    return [dct.get(i) for i in range(max(dct) + 1)] if nums else []



# alternative without import
#def group_in_10s(*nums):
#    s = sorted(nums)
#    lst = [[] for _ in range(s[-1] // 10 + 1)] if nums else []
#    for n in s:
#        lst[n//10].append(n)
#    return [l or None for l in lst]


def group_in_10s(*li):
    li,result,ini,i = sorted(li),[],10,0
    while i < len(li):
        temp = []
        while i < len(li) and li[i] < ini:
            temp.append(li[i]) ; i += 1
        result.append(temp or None) ; ini += 10
    return result

from collections import defaultdict

def group_in_10s(*xs):
    d = defaultdict(list)
    for x in xs:
        d[x // 10].append(x)
    return [sorted(d[i]) if i in d else None for i in range(max(d) + 1)] if d else []

def group_in_10s(*args):
  return [None if len(y) == 0 else y for y in [sorted([x for x in list(args) if int(x / 10) == i]) for i in range(0, int(max(list(args)) / 10) + 1)]] if args else []

def group_in_10s(*args):
    if not args: return []
    args = sorted(args)
    lsd = [None] * (max(args) //10 +1)
    for i in args:
        if not lsd[i//10]: lsd[i//10] = [i]
        else: lsd[i//10].append(i)
    return lsd

from collections import defaultdict

def group_in_10s(*args):
    d = defaultdict(list)
    for x in args:
        d[x // 10].append(x)
    return [sorted(d[k]) if k in d else None for k in range(0, max(d) + 1)] if d else []


from itertools import groupby

def group_in_10s(*args):
    if not args: return []
    res = [None] * (1 + max(args) // 10)
    for a, b in groupby(args, key = lambda x: x // 10):
        if res[a] == None:
            res[a] = sorted(list(b))
        else:
            res[a] = sorted(res[a] + list(b))
    return res


from collections import defaultdict
def group_in_10s(*l):
    if not l : return []    
    d = defaultdict(list)
    for i in l:
        d[int(str(i//10))].append(i)
    return [None if d[i] == [] else sorted(d[i]) for i in range(1 + max(d.keys()))]