mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
psf/black code formatting (#1277)
This commit is contained in:

committed by
Christian Clauss

parent
07f04a2e55
commit
9eac17a408
@ -16,12 +16,14 @@ while Q is non-empty:
|
||||
|
||||
"""
|
||||
|
||||
G = {'A': ['B', 'C'],
|
||||
'B': ['A', 'D', 'E'],
|
||||
'C': ['A', 'F'],
|
||||
'D': ['B'],
|
||||
'E': ['B', 'F'],
|
||||
'F': ['C', 'E']}
|
||||
G = {
|
||||
"A": ["B", "C"],
|
||||
"B": ["A", "D", "E"],
|
||||
"C": ["A", "F"],
|
||||
"D": ["B"],
|
||||
"E": ["B", "F"],
|
||||
"F": ["C", "E"],
|
||||
}
|
||||
|
||||
|
||||
def bfs(graph, start):
|
||||
@ -40,5 +42,5 @@ def bfs(graph, start):
|
||||
return explored
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(bfs(G, 'A'))
|
||||
if __name__ == "__main__":
|
||||
print(bfs(G, "A"))
|
||||
|
Reference in New Issue
Block a user