Python program to get all possible slices of a string for K number of slices
Given a string, the task is to write a Python program to get all possible slices for K number of slices. Input : test_str = "Gfg4all", K = 3Output : [['G', 'f', 'g4all'], ['G', 'fg', '4all'], ['G', 'fg4', 'all'], ['G', 'fg4a', 'll'], ['G', 'fg4al', 'l'], ['Gf', 'g', '4all'], ['Gf', 'g4', 'all'], ['G