In 22 range 10000 In 23 range 10000 20000 In 24 timeit 1000 loops best

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
In [22]: x=range(0,10000)
In [23]: y=range(10000,20000)
In [24]: %timeit x+y
1000 loops, best of 3: 242 µs per loop
In [25]: %timeit set(x+y)
1000 loops, best of 3: 1.43 ms per loop
In [26]: %timeit list(set(x+y))
1000 loops, best of 3: 1.81 ms per loop