---
id: 65577739f57ecca6c39bb4e9
title: Step 33
challengeType: 20
dashedName: step-33
---

# --description--

The `list()` type constructor enables you to build a list from an iterable.

Modify the assignment of your `unvisited` variable to use `list()`, and pass `graph` as the iterable.

# --hints--

You should use `list()` to generate a list from the `graph` dictionary.

```js
({ test: () =>  {
    const shortest = __helpers.python.getDef(code, "shortest_path");
    const {function_body} = shortest;    
    assert(function_body.match(/list\s*\(\s*graph\s*\)/));
  }
})
```

You should assign `list(graph)` to `unvisited`.

```js
({ test: () =>  {
    const shortest = __helpers.python.getDef(code, "shortest_path");
    const {function_body} = shortest;    
    assert(function_body.match(/unvisited\s*=\s*list\s*\(\s*graph\s*\)/));
  }
})
```

# --seed--

## --seed-contents--

```py
my_graph = {
    'A': [('B', 3), ('D', 1)],
    'B': [('A', 3), ('C', 4)],
    'C': [('B', 4), ('D', 7)],
    'D': [('A', 1), ('C', 7)]
}

--fcc-editable-region--
def shortest_path(graph, start):
    unvisited = []
    distances = {}
    
    print(f'Unvisited: {unvisited}\nDistances: {distances}')
    
shortest_path(my_graph, 'A')
--fcc-editable-region--
```
