Https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/step-21

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

Good evening…I am sorry me again.
I am new with python and I know I have to read/prectice and practice/read to underdand . But here I do not know what is wrong.

Thank you for your help…

Can you share your code

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Instead of appending A, B, C, D to the unvisited array, you need to append node, which is what you are getting each time through the loop.

The request asks:

and append each node to the unvisited list.

Thank you so much @anon28508191 I got your point. Now, it is a couple of weeks that I am using freecodecamp: what I should focus on more is:

  1. read carefully the question. I should spend more time read and read again the question
  2. understand the question properly
  3. practice practice and read the theory
    I will get there…
    Ciaoooo
1 Like