# Grouping Nested Lists Based on Differing Values of Single Element

I've a list of lists representing k-rows of truth table having n elements each in a nested list consider

lst={{True, True, True}, {True, True, False}, {True, False, True}, {True,
False, False}, {False, True, True}, {False, True, False}, {False,
False, True}, {False, False, False}}

i want to get all those sublists having n-1 elements same but differ by jth element

e.g. if i want the 2nd element to of a given list to be different i should get the following result group:

lst={{{True, True, True},  {True, False, True}}, {{True, True, False}, {True,
False, False}}, {{False, True, True}, {False,
False, True}},{{False, True, False}, {False, False, False}}}

similarly, if i want the third element to be differnt i should get this:

lst={{{True, True, True}, {True, True, False}}, {{True, False, True}, {True,
False, False}}, {{False, True, True}, {False, True, False}}, {{False,
False, True}, {False, False, False}}}

I'll be thankful for anyone helping out.

Module[{l = #, ll = Length@#[[1]], ta, s},
ta = ConstantArray[True, ll];
ta[[#2]] = False;
s = Subsets[l, {2}];
s[[Flatten@Position[SameQ @@@ Transpose@# & /@ s, ta]]]] &[lst, 2]

(*
{{{True, True, True}, {True, False, True}}, {{True, True,
False}, {True, False, False}}, {{False, True, True}, {False, False,
True}}, {{False, True, False}, {False, False, False}}}
*)

Probably much faster, certainly more concise:

With[{l = #, c = Complement[Range@Length@#[[1]], {#2}]},
Cases[GatherBy[l, #[[c]] &], {_, __}]] &[lst, dp]

In either, first argument is your list, second argument is the element position in sublists you wish to differ.