You're putting together contact information for all the users of your website to ship them a small gift. You queried your database and got back a list of users, where each user is another list with up to two items: a string representing the user's name and their shipping zip code. Example data might look like:

```python
[["Grae Drake", 98110], ["Bethany Kok"], ["Alex Nussbacher", 94101], ["Darrell Silver", 11201]]
```
Notice that one of the users above has a name but _doesn't_ have a zip code.

Write a function `user_contacts()` that takes a two-dimensional list like the one above and returns a dictionary with an item for each user where the key is the user's name and the value is the user's zip code. If your data doesn't include a zip code then the value should be `None`.

For example, using the input above, `user_contacts()` would return this dictionary:
```python
{
    "Grae Drake": 98110,
    "Bethany Kok": None,
    "Alex Nussbacher": 94101,
    "Darrell Silver": 11201,    
}
```

You don't have to worry about leading zeros in zip codes.

Difficulty: introductory

Starter code:

def user_contacts(data):
	

Solutions:
def user_contacts(data):
    return {contact[0]: contact[1] if len(contact) > 1 else None
            for contact in data}


def user_contacts(data):
    return {u[0]: (u[1] if len(u) > 1 else None) for u in data}

def user_contacts(data):
    a = {}
    for i in data:
        a[i[0]] = i[1] if len(i) == 2 else None
    return a

def user_contacts(data):
  return {p[0]: p[1] if len(p) > 1 else None for p in data}

def user_contacts(data):
    dictionary={}
    for t in data:
        if len(t)==1:
            dictionary[t[0]]=None
        elif len(t)==2:
            dictionary[t[0]]=t[1]
    return dictionary

def user_contacts(data):
    return {l[0]: l[1] if len(l)>1 else None for l in data}

def user_contacts(data):
    return {a : b[0] if b else None for a, *b in data}

from itertools import zip_longest

def user_contacts(data):
    return dict(zip(*zip_longest(*data)))

def user_contacts(data):
    return {name: (code[0] if code else None) for name, *code in data}

def user_contacts(data):
    return {d[0]:d[1] if len(d)>1 else None for d in data}
    # Your code here.