85.8k views
0 votes
Say you have a long string and you want to collect all of the letters within it without storing duplicates. What would be the most appropriate type to store the letters in?

a. a set
b. a list
c. the original string
d. a dictionary

1 Answer

2 votes

A set because sets do not allow duplicated elements

User Eugene Berdnikov
by
5.9k points