fork download
  1. def f1(list_of_list):
  2. for x in inner_list:
  3. def f2(list_of_list):
  4. result = []
  5. for inner_list in list_of_list:
  6. if x not in result:
  7. result.append(x)
  8. return result
  9. flat_list = []
  10. for inner_list in list_of_list:
  11. flat_list.extend(inner_list)
  12. return [
  13. x for i, x in enumerate (flat_list)
  14. if flat_list.index (x) == i]
  15. def f3(list_of_list):
  16. result = []
  17. seen = set()
  18. for inner_list in list_of_list:
  19. for x in inner_list:
  20. if x not in seen:
  21. result.append(x)
  22. seen.add(x)
  23. return result
Success #stdin #stdout #stderr 0.02s 6916KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/42oGhP/prog:23:12: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit