#NEWLINE# def sample( self , population , k ) : #NEWLINE# #INDENT# seq = list ( population ) #NEWLINE# s = [ ] #NEWLINE# for i in xrange ( k ) : #NEWLINE# #INDENT# pick = random . choice ( seq ) #NEWLINE# seq . remove ( pick ) #NEWLINE# s . append ( pick ) #NEWLINE# #UNINDENT# return s