There are two lists of different length. The first one consists of keys, the second one consists of values. Write a function ```createDict(keys, values)``` that returns a dictionary created from keys and values. If there are not enough values, the rest of keys should have a ```None``` value. If there not enough keys, just ignore the rest of values.

Example 1:
```python
keys = ['a', 'b', 'c', 'd']
values = [1, 2, 3]
createDict(keys, values) # returns {'a': 1, 'b': 2, 'c': 3, 'd': None}
```

Example 2:
```python
keys = ['a', 'b', 'c']
values = [1, 2, 3, 4]
createDict(keys, values) # returns {'a': 1, 'b': 2, 'c': 3}
```

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def createDict(keys, values):
	

Solutions:
def createDict(keys, values):
	while len(keys) > len(values):
		values.append(None)
	dictionary = dict(list(zip(keys, values)))
	return dictionary


def createDict(keys, values):
	return dict(zip(keys, values + [None] * (len(keys) - len(values))))


def createDict(keys, values):
	return {k: values[i] if i < len(values) else None for (i, k) in enumerate(keys)}


def createDict(keys, vals):
	res = {}
	for (i, key) in enumerate(keys):
		res[key] = vals[i] if i < len(vals) else None
	return res


def createDict(keys, values):
	newdict = {}
	for i in range(len(keys)):
		if i < len(values):
			newdict[keys[i]] = values[i]
		else:
			newdict[keys[i]] = None
	return newdict


import itertools

def createDict(keys, values):
	return dict(zip(keys, itertools.chain(values, itertools.repeat(None))))


from itertools import zip_longest

def createDict(K, V):
	return {k: v for (k, v) in zip_longest(K, V) if k}