# Learn Algorithm Design by Building a Shortest Path Algorithm - Step 21

### Tell us what’s happening:

I feel like I did everything that’s asked in this step and still the code doesn’t pass. I am quite new at programming with python and english it’s not my first language so I’m for sure missing something I just don’t know what. I appreciate any advice, knowledge you have. Thank you!!!
This is the step:
Create a `for` loop to iterate over your graph, and append each node to the `unvisited` list.

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

# User Editable Region

def shortest_path(graph, start):
unvisited = []
for node in graph:
unvisited.append('A', 'B', 'C', 'D')

# User Editable Region

``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36`

### Challenge Information:

Learn Algorithm Design by Building a Shortest Path Algorithm - Step 21

You are supposed to append the node at the current iteration. You don’t have to specify which one.
Also, remember that `append` can take a single argument. `a_list.append(item1, item2)` will raise an exception.

1 Like

Thank you!!!

1 Like

I tried all the suggestions provided here, none of them is working out for me. It’s still saying, as below: -

You should append each node to `unvisited` inside your `for` loop

Here is my code so far: -

def shortest_path(graph, start):
unvisited =
for my_graph in graph:
unvisited.append(‘A’,‘B’,‘C’,‘D’)