Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT str1 = " abcbaa " NEW_LINE k = 3 NEW_LINE print ( " Total ▁ substrings ▁ with ▁ exactly " , k , " distinct ▁ characters ▁ : ▁ " , end = " " ) NEW_LINE print ( countkDist ( str1 , k ) ) NEW_LINE DEDENT