Computer Science, asked by kirtitripathi3583, 1 year ago

How do we convert a string to a set in Python?

Answers

Answered by fl1xter
0

just use:

set()

eg.

print(set('thequickbrownfoxjumpsoveralazydog'))

returns

{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}

in a random order

Similar questions