from itertools import groupby
lst = ['java', '', 'python', 'php', '', 'c', 'c++', 'c#', '', 'javascript']
lst = [list(sub) for e, sub in groupby(lst, key = bool) if e]
print(lst)
'''
run:
[['java'], ['python', 'php'], ['c', 'c++', 'c#'], ['javascript']]
'''