Create a SubList from list of strings where same character of strings are grouped into single list

Create a sublist from list of strings where same charater of strings are grouped into single list.

Sample Input
# input_list = ["abc","bac","def","edf","sdf","cab"]

Sample Output -
output_list = [["abc","bac","cab"],["def","edf"],["sdf"]]

Comments (1)