Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT s = [ ' b ' , ' a ' , ' n ' , ' a ' , ' n ' , ' a ' ] NEW_LINE n = len ( s ) NEW_LINE k = 2 NEW_LINE t = [ ' ' ] * n NEW_LINE subsequence ( s , t , n - 1 , k ) NEW_LINE t = ' ' . join ( t ) NEW_LINE print ( t ) NEW_LINE DEDENT