I want to generate all substrings of size k-1 from a string of size k.
e.g 'abcd' should give me
Order of these strings in the list doesnt matter.
Also order doesnt matter inside the string e.g 'abc' or 'bca' or 'bac' is the same.
The following code doesnt give the full output(iteration over each string)
subsetList = []
prunedNew = ['abcd']
for element in prunedNew:
for i in range(0,2):
subsetList.append(element[i:i+len(element)-1])
continue
continue
return prunedNew
Thanks,
girish