fork(1) download
  1. edges=[(10, 1), (10, 8)]
  2.  
  3. print edges
  4.  
  5. for (i,j) in edges:
  6. if i>j:
  7. edges.remove((i,j))
  8. edges.append((j,i))
  9.  
  10. print edges
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
[(10, 1), (10, 8)]
[(10, 8), (1, 10)]