parameters: (self, s, k)
return_statement: return s
docstring: :type s: str
          :type k: int
          :rtype: str
docstring_summary: :type s: str
          :type k: int
          :rtype: str
docstring_tokens: : type s : str : type k : int : rtype : str
function: def truncateSentence(self, s, k):
          """
          :type s: str
          :type k: int
          :rtype: str
          """
          for i in xrange(len(s)):
              if s[i] == ' ':
                  k -= 1
                  if not k:
                      return s[:i]
          return s
function_tokens: def truncateSentence ( self , s , k ) : for i in xrange ( len ( s ) ) : if s [ i ] == ' ' : k -= 1 if not k : return s [ : i ] return s