2010-11-12から1日間の記事一覧

set()楽しい

a = [1, 2, 3, 4, 5] b = [1, 2, 6, 7, 8] print set(a) print set(b) print set(a+b) print set(a+b) - set(a) print set(a+b) - set(b) print [i for i in (set(a+b) - set(a))] + [i for i in (set(a+b) - set(b))] print set([i for i in (set(a+b) - se…