Exam 300-535 Topic 9 Question 104 Discussion

Actual exam question for Cisco's 300-535 exam
Question #: 104
Topic #: 9
What is the output of this Python code snippet?
s = "banana apple orange banana orange coconut apple"
words = [word for word in s.split(" ")]
print(" ".join(sorted(list(set(words)))))

Suggested Answer: D Vote an answer

The code splits the string into words, removes duplicates with set, sorts the unique words, and joins them back into a space-separated string, resulting in apple banana coconut orange.

by Bartley at Sep 28, 2025, 05:06 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어