Skip to content

Instantly share code, notes, and snippets.

@titouanc
Created December 5, 2012 14:30
Show Gist options
  • Select an option

  • Save titouanc/4215905 to your computer and use it in GitHub Desktop.

Select an option

Save titouanc/4215905 to your computer and use it in GitHub Desktop.
#Construction des chemins a partir d'un chemin et d'une relation:
# (A, B):[M, N] et B:(D) => (A, D):[M, N, B]
RELATIONS = {
A : (B),
B : (C, D)
}
CHEMINS = {
(A, B) : [],
(B, C) : [],
(B, D) : []
}
for couple1 in CHEMINS:
de1, a1 = couple1 #expansion du tuple
for a2 in RELATIONS[a1]:
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment