Skip to content

Instantly share code, notes, and snippets.

@y56
Created February 2, 2020 22:54
Show Gist options
  • Save y56/2bc6fc03143c460074857abcdd15d15b to your computer and use it in GitHub Desktop.
Save y56/2bc6fc03143c460074857abcdd15d15b to your computer and use it in GitHub Desktop.
List of all unique characters in a string?
https://stackoverflow.com/questions/13902805/list-of-all-unique-characters-in-a-string
```
In [10]: ''.join(set('aaabcabccd'))
Out[10]: 'acbd'
```
```
In [1]: list(set('aaabcabccd'))
Out[1]: ['a', 'c', 'b', 'd']
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment