<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution : <EOL> def combine ( self , n , k ) : <EOL> """<STR_LIT>""" <EOL> result = [ ] <EOL> nums = [ i + <NUM_LIT:1> for i in xrange ( n ) ] <EOL> self . get_combination ( k , nums , [ ] , result ) <EOL> return result <EOL> def get_combination ( self , k , nums , current , result ) : <EOL> if len ( current ) == k : <EOL> result . append ( current ) <EOL> return <EOL> elif len ( current ) + len ( nums ) < k : <EOL> return <EOL> for ind , val in enumerate ( nums ) : <EOL> self . get_combination ( k , nums [ ind + <NUM_LIT:1> : ] , current + [ val ] , result ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> print Solution ( ) . combine ( <NUM_LIT:4> , <NUM_LIT:2> ) </s>
