How to converte string to set in Python

1 Answer

0 votes
s = 'python'

x = set(s)

print(x)


'''
run:

{'t', 'o', 'y', 'n', 'p', 'h'}

'''

 



answered Sep 21, 2017 by avibootz

Related questions

1 answer 180 views
1 answer 116 views
1 answer 143 views
1 answer 167 views
...