Skip to content

Instantly share code, notes, and snippets.

@sreevidyavutukuru
Created July 4, 2017 22:19
Show Gist options
  • Save sreevidyavutukuru/19f5ba5d11e00bbeb568ac12988b5f27 to your computer and use it in GitHub Desktop.
Save sreevidyavutukuru/19f5ba5d11e00bbeb568ac12988b5f27 to your computer and use it in GitHub Desktop.
Str1 = "aaabbcgfhh"
SubStrs = []
SubStrd_Dict = {}
for i in range(1,len(Str1)):
#SubStrs.append(i)
SubStrs = []
for j in range(0,len(Str1)-i):
SubStrs.append(Str1[j:j+i])
#print SubStrs
SubStrd_Dict[i] = SubStrs
#print SubStrd_Dict
print SubStrd_Dict[3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment