useful modules from itertools import combinations_with_replacement as cwr from math import log as ln location usuallyimport statements go at the beginning of the programbut there is no restriction they can go anywhere as long as they come before the code that uses the module getting help to get help on module (say the random moduleat the python shellimport it using the third way above then dir(randomgives list of the functions and variables in the moduleand help(randomwill give you rather long description of what everything does to get help on specific functionlike randinttype help(random randint dates and times the time module has some useful functions for dealing with time sleep the sleep function pauses your program for specified amount of time (in secondsfor instanceto pause your program for seconds or for millisecondsuse the followingsleep( sleep timing things the time function can be used to time things here is an examplefrom time import time start time(do some stuff print'it took 'round(time()-start )'seconds 'for another examplesee section which shows how to put countdown timer into gui the resolution of the time(function is milliseconds on windows and microseconds on linux the above example uses whole seconds if you want millisecond resolutionuse the following print statementprint'{ fseconds format(time()-start)you can use little math on this to get minutes and hours here is an examplet time()-start secs % mins // hours mins// by the waywhen you call time()you get rather strange value like it is the number of seconds elapsed since january