Random integers produced by randrange.
import random # simulates 20 die rolls for i in range( 1, 21 ): print "%10d" % ( random.randrange( 1, 7 ) ), if i % 5 == 0: # print newline every 5 rolls print