nikunjsoni

1816

Apr 4th, 2021
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Solution(object):
  2.     def truncateSentence(self, s, k):
  3.         """
  4.        :type s: str
  5.        :type k: int
  6.        :rtype: str
  7.        """
  8.         st = s.split(' ')
  9.         return (" ".join(st[0:k]))
  10.        
RAW Paste Data