Exam 300-535 Topic 9 Question 104 Discussion
Actual exam question for Cisco's 300-535 exam
Question #: 104
Topic #: 9
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)))))
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
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
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).