partition function for lists

it returns a two dim list bc there are no tuples 
was bored so i thought i'd write it