repl.it
@MuriloPortugal/

Python testes

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
from collections import deque
pathfindingArr= [deque(['I', 'D', 'C']), deque(['C', 'J']), deque(['J', 'C', 'D', 'E'])]
out = []
for i,deq in enumerate(pathfindingArr):
  for element in deq:
    if len(out)==0:
      out.append(element)
    else:
      if not element == out[len(out)-1]:
        out.append(element)
    
print(out)
?