input: def words_with_prime_length(sentence):
      """
      Given a string representing a sentence,
      which consists of several words separated by spaces,
      return a new string containing words from the original sentence,
      but only those whose lengths are prime numbers,
      maintaining the order of words as in the original sentence.
  
      Example 1:
          Input: sentence = "This is a test"
          Output: "is"
  
      Example 2:
          Input: sentence = "lets go for swimming"
          Output: "go for"
  
      Constraints:
          * 1 <= len(sentence) <= 100
          * sentence contains only alphabetic characters
      """
output:     def is_prime(n):
          if n <= 1:
              return False
          if n <= 3:
              return True
          if n % 2 == 0 or n % 3 == 0:
              return False
          i = 5
          while i * i <= n:
              if n % i == 0 or n % (i + 2) == 0:
                  return False
              i += 6
          return True
  
      words = sentence.split()
      result = [word for word in words if is_prime(len(word))]
      return ' '.join(result)