Не используя импорт, вы можете сделать это с помощью старого доброго цикла for, перебирающего элементы списков. Вот код, работающий также для любого типа, который вы хотите, а не только для строки:
def group_list(a_list, a_type):
res = []
sublist = []
for elem in a_list:
if isinstance(elem, a_type):
# Here the element is of type a_type: append it to a sublist
sublist.append(elem)
else:
# Here the element is not of type a_type: append the sublist (if not empty) to the result list
if sublist:
res.append(sublist)
sublist = []
# If the last element of the list is of type a_type, the last sublist has not been appended: append it now
if sublist:
res.append(sublist)
return res
foo = [5,2,'a',8,4,'b','y',9, 'd','e','g']
print(group_list(foo,str))
# [['a'], ['b', 'y'], ['d', 'e', 'g']]