```if-not:ruby
Create a function, that accepts an arbitrary number of arrays and returns a single array generated by alternately appending elements from the passed in arguments. If one of them is shorter than the others, the result should be padded with empty elements.
```
```if:ruby
Create a function, that accepts an arbitrary number of arrays and returns a single array generated by alternately appending elements from the passed in arguments. If one of them is shorter than the others, the result should be padded with `nil`s.
```

Examples:

```python
interleave([1, 2, 3], ["c", "d", "e"]) == [1, "c", 2, "d", 3, "e"]
interleave([1, 2, 3], [4, 5]) == [1, 4, 2, 5, 3, None]
interleave([1, 2, 3], [4, 5, 6], [7, 8, 9]) == [1, 4, 7, 2, 5, 8, 3, 6, 9]
interleave([]) == []
```

Difficulty: EASY
Starter code: def interleave(*args):
	

Solutions:
from itertools import chain, zip_longest

def interleave(*args):
	return list(chain.from_iterable(zip_longest(*args)))


def interleave(*args):
	max_len = max(map(len, args))
	interleaved = []
	for i in range(max_len):
		for arr in args:
			if i < len(arr):
				interleaved.append(arr[i])
			else:
				interleaved.append(None)
	return interleaved


from itertools import chain, zip_longest

def interleave(*args):
	return [*chain(*zip_longest(*args))]


interleave = lambda *a: [b[i] if len(b) > i else None for i in range(max((len(i) for i in a))) for b in a]


from itertools import zip_longest

def interleave(*args):
	return [y for x in zip_longest(*args) for y in x]


interleave = lambda *a: sum([list(i) for i in __import__('itertools').zip_longest(*a)], [])


from itertools import zip_longest

def interleave(*args):
	return [i for _ in zip_longest(*args) for i in _]


def interleave(*args):
	arr = []
	for i in range(max((len(a) for a in args))):
		for j in range(len(args)):
			try:
				arr.append(args[j][i])
			except:
				arr.append(None)
	return arr


def interleave(*args):
	n_max = len(max(args, key=len))
	return [j[i] if i < len(j) else None for i in range(n_max) for j in args]