I have to initialize class with list, which will return every sublists from the given list.
I have a problem with defining empty list as an argument:
class list():
def sublists(self, lst=[]):
sub = [[]]
for i in range(len(lst)+1):
for j in range (i+1, len(lst)):
sub = lst[i:j]
sub.append(sub)
return sub
listas a name for a class, that will shadow the built-in namelist