<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
K length words that can be formed from given characters without repetition
Python3 implementation of the approach ; Function to return the required count ; To store the count of distinct characters in str ; Traverse str character by character ; If current character is appearing for the first time in str ; Increment the distinct character count ; Update the appearance of the current character ; Since P ( n , r ) = n ! / ( n - r ) ! ; Return the answer ; Driver code

<ASSISTANT_TASK:>
Python Code:
import math as mt 
 def findPermutation(string , k ) : 
	 has =[False for i in range(26 ) ] 
 cnt = 0 
 for i in range(len(string ) ) : 
	 if(has[ord(string[i ] ) - ord(' a ' ) ] == False ) : 
	 cnt += 1 
 has[ord(string[i ] ) - ord(' a ' ) ] = True 
   ans = 1 
 for i in range(2 , cnt + 1 ) : 
	 ans *= i 
  for i in range(cnt - k , 1 , - 1 ) : 
	 ans //= i 
  return ans 
  string = "geeksforgeeks "
 k = 4 
 print(findPermutation(string , k ) ) 

<END_TASK>
