Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: Python
Posted by: Jason Kumpf
Added: Jun 4, 2013 2:45 AM
Views: 83
Tags: no tags
  1. f = lambda x: [[y for j, y in enumerate(set(x)) if (i >> j) & 1] for i in range(2**len(set(x)))]