Created
May 2, 2020 20:45
-
-
Save wiccy46/4e0191401440cdad7ac93faa126bacba to your computer and use it in GitHub Desktop.
[subsequence] subsequence of a string using combinations #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import combinations | |
s = 'abcdef' | |
set(''.join(c) for i in range(len(s) + 1) for c in combinations(s, i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment