tynbl.github.io

? 和 ??

x = 5
x?
x??
def print_info():
    """
        show information
    """
    print 'Hello ChinaHadoop'
print_info?
print_info??

魔术命令

%timeit [x for x in range(10)]
1000000 loops, best of 3: 888 ns per loop
%%time
l = []
for x in range(100000):
    l.append(x)
Wall time: 33 ms