doublechenchen

how to use the python

0
阅读(1071)

in shell,  click  'help' choose  Python Docs

u can enter the 'timeit' in the 'index' button, u can get what u want to know from the doc


u can also use the IDLE:

       import    timeit

       timeit.__doc__

   print(timeit.__doc__)  #this command will make u get more clear idea


dir(timeit)   # can get all the attributes

timeit.__all__      # u can use this to show all the classes or functions or sth else which can be called for the public . Attention please, not all the function has the '__all__'

when u use the command 'from timeit import * ' it can only be used for the one exist in the **.__all__


when u use the command :**.__file__  

u can see the source code of this function



finnaly,u can use the command help(**) to get how to use the command