input: Write a function to generate a string from a list of phrases where each phrase is followed by its length in parentheses. For example, if the input list is ["A bird in the hand", "is worth two in the bush"], the output should be "A bird in the hand (17)is worth two in the bush (25)". If the input list is empty, the function should return an empty string.
  assert generate_string_with_lengths(["A bird in the hand", "is worth two in the bush"]) == "A bird in the hand (17)is worth two in the bush (25)"
  assert generate_string_with_lengths([]) == ""
  assert generate_string_with_lengths(["Hello"]) == "Hello (5)"
output: def generate_string_with_lengths(phrases):
      if not phrases:
          return ""
      return ''.join([f"{phrase} ({len(phrase)})" for phrase in phrases])