summaryrefslogtreecommitdiff
path: root/python/pairs.py
blob: 8372775dbeac99587e9f273fc89cbec799c3123c (plain)
1
2
3
4
5
6
7
#!/usr/bin/env python2


a=[1,2,3,4,5,6,7,8,9,10]
b=[(a[i], a[j]) for i in range(len(a)) for j in range(i+1,len(a))]
print len(b)