How to print the use of different characters (letters) in a string in Python

1 Answer

0 votes
s = "python programming language"

lst = list(set(s))

print(lst)



'''
run:

['l', 'n', 'm', 'i', ' ', 'y', 'p', 'g', 'h', 'r', 'o', 'u', 'a', 't', 'e']

'''

 



answered Jan 25, 2024 by avibootz
...