fork download
  1. #!/usr/bin/env python
  2.  
  3. f=lambda n:sum([[x,n/x]for x in range(1,n+1)if n%x<1],[])
  4.  
  5. print f(12)
Success #stdin #stdout 0.01s 7308KB
stdin
Standard input is empty
stdout
[1, 12, 2, 6, 3, 4, 4, 3, 6, 2, 12, 1]