Although this is much less efficient than itertools, if you are not allowed to use libraries, you could make a recursive function to produce the power-set and assemble the strings using join() in a list comprehension:
def powerSet(L):
return [[]] if not L else [c for p in powerSet(L[1:]) for c in (p,L[:1]+p)]
x = ['a','b','c']
y = [",".join(s) or "ø" for s in powerSet(x)]
print(y)
['ø', 'a', 'b', 'a,b', 'c', 'a,c', 'b,c', 'a,b,c']
You can also do this directly in an iterative function that extends all previous combinations with each letter in the list:
def allCombos(L):
result = [""]
for c in L:
result.extend([f"{r},{c}" if r else c for r in result])
result[0] = "ø"
return result
print(allCombos(x))
['ø', 'a', 'b', 'a,b', 'c', 'a,c', 'b,c', 'a,b,c']